Aller au contenu principal

Claude Code vs Codex: use both, and switch when you hit a limit

Many developers now have both Claude Code and Codex. Which model is better changes from month to month, so this page skips that question. What matters for daily work is how each tool reads your project, where it keeps its session, and what happens when its usage window runs out halfway through a task.

Side by side​

Claude CodeCodex
Instruction fileCLAUDE.md (a one-line @AGENTS.md import pulls in the shared file)AGENTS.md
Skills folder.claude/skills/, or plugins.agents/skills/, invoked as $name
Where the session lives~/.claude/projects/…/<id>.jsonl~/.codex/sessions/…
Resume the same sessionclaude -r <id>codex resume <id> or codex resume --last
Cloud optionClaude Code on the web and Projects threadsCodex cloud tasks
Usage5-hour and weekly windows on Pro and Max plans5-hour and weekly windows on ChatGPT plans
Picks up the other's session?NoNo

The last row is the important one. Neither tool picks up the other's transcript, and a second account of the same tool doesn't either. On the same machine one tool could dig through the other's files, but they are long, tool-specific and not meant as a handoff. On another machine, another account or in the cloud they are not there at all. When one runs out, the plan, the decisions and your uncommitted edits stay behind.

When Claude Code hits its usage limit​

The fix is to keep the state of the work in the repository instead of in the chat. With SpecWeave:

  1. In Claude Code, say "hand off", or run:

    specweave handoff --reason "out of usage"

    This releases your task claims, writes handoff.md with where you stopped and what comes next, and pushes your branch and a snapshot of your uncommitted edits.

  2. Open Codex in the same repository and say "pick up", or run:

    specweave pickup

    Codex gets your edits back and sees the next task with its acceptance criteria, any notes, and the project memory, all in one read.

It works the same way in the other direction, and between two accounts of the same tool. Switch from Claude Code to Codex without losing your place walks through it step by step, and Claude Code usage limit reached covers your other options when a limit hits.

Hand off before the limit, automatically​

On your own machine, SpecWeave can do this for you:

specweave auto-handoff on          # heads-up at 95% of the 5-hour or weekly window

In Claude Code it reads the usage the status line reports. In Codex it reads the rate limits Codex writes to its session log. When usage crosses the threshold, the agent tells you once that a handoff is available and keeps working; say "hand off" when you want to move. In Claude Code, a turn that actually hits the limit hands off by itself. Then you say "pick up" in the other tool. --mode enforce stops and hands off at the threshold instead. Cloud sessions don't expose usage, so there you still say "hand off" yourself.

Set up one repository for both​

npm install -g specweave
specweave init

init writes one AGENTS.md for Codex and every other agent, a CLAUDE.md that imports it, and the same skills into .claude/skills/ and .agents/skills/. Nothing needs reinstalling when you switch. See AGENTS.md vs CLAUDE.md for why one file is enough.

Using both on purpose​

Switching isn't only for emergencies. Some teams let one tool implement and the other review, or run a Claude Code Projects thread and a Codex cloud task on separate increments at the same time. The ledger records which tool claimed and finished each task (claude@laptop, codex@cloud), so you can see afterwards who did what.

Prefer a desktop app?

SpecWithCode is a free desktop app with source available for inspection that runs Claude Code and Codex side by side. When one subscription hits its limit, the thread continues on another signed-in provider by default. Watch Keep working when a provider runs out.

Common questions​

Can Codex read my Claude Code conversation? Not as a handoff. On the same machine Codex could open Claude Code's transcript files, but they are long, tool-specific and leave out your uncommitted edits, and on another machine or in the cloud they are not there. SpecWeave carries what matters (the spec, the task state, your edits and a note) through git instead.

Do I need both subscriptions? No. The same handoff works between two accounts of one tool, or to Grok Build, Gemini CLI, Cursor or Copilot.

What if I don't want another CLI? Install the self-contained handoff skill with npx vskill i handoff. It needs only git and a shell and writes a compatible handoff.md.

See also​