Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How Claude Code and Codex store sessions, and how to hand a task from one to the other

Description and use

Automated task handoff between Claude Code and Codex using cursor‑based sync and local JSONL files, implemented in the ccx macOS app.

Problem

Switching between Claude Code and Codex leaves each side unaware of the other's progress, making task handoff difficult.

Outcome

The handoff between Claude Code and Codex is automated, reducing token usage to a few thousand per update and eliminating the need for manual exports.

Workflow

  • 1. Read Claude Code session JSONL from ~/.claude/projects/<project>/<session-id>.jsonl
  • 2. Condense tool results: keep messages verbatim, summarize tool calls, add current todo list and git status
  • 3. Store condensed progress in a cursor file
  • 4. On switch, send only the delta after the cursor to Codex via its app‑server thread
  • 5. Codex receives the delta, updates its thread, and writes back progress
  • 6. Claude receives Codex’s new progress via UserPromptSubmit hook and prepends it to the next user message
  • 7. Repeat steps 4‑6 whenever switching

Evidence

Every Claude Code session is a JSONL file under ~/.claude/projects/<escaped-project-path>/<session-id>.jsonl.

Source

I packaged all of this as ccx, an open-source macOS menu bar app. Click ⇄ to hand off.

Source

One Claude session is paired with one Codex thread. Each side keeps a cursor: the last event already synced.

Source

  • Record date: 2026-10-23T10:26:25.050Z