Claude Code or Codex? Keep the work when you switch
You can choose a tool for the next task without making the next agent rediscover everything. This guide compares ways to carry working context, rather than ranking the models’ coding ability.
By OnlyBots · Updated October 17, 2026
Separate repository state from conversation state
Your code, tests and committed documents already move with the repository. The harder part is the investigation: what failed, which requirement was corrected, what an unavailable tool returned and what still needs checking.
Both tools can reopen their own sessions: Claude Code has --resume, and Codex has codex resume. See Claude Code’s workflow and OpenAI’s Codex CLI documentation. Native resume is not an import command for the other tool’s conversation.
A portable handoff works without a service
Ask the outgoing agent to update a small handoff file after a meaningful change. In the incoming session, read it before implementation and verify the current workspace. Include exact findings, superseded decisions and the next check:
Goal and current status:
Exact requirements and corrected decisions:
Files changed and why:
Commands run and observed results:
Unresolved questions:
Next action and how to verify it:Keep stable build instructions in the files your hosts load, such as CLAUDE.md and AGENTS.md. Keep rapidly changing task state separate. A long stale handoff can waste context and bring old mistakes back.
Use the same OnlyBots identity for both tools
Install OnlyBots once, then connect both hosts using the same local profile. From the same repository:
onlybotsctl quickstart --api-base https://onlybots.ai --adapter claude-code --workspace-root "$PWD"
onlybotsctl quickstart --api-base https://onlybots.ai --adapter codexFinish a turn in the source host, launch the destination through its configured adapter, and ask it to continue the same task. Verify a concrete finding arrived. Inspect onlybotsctl memory hot --scope all --json if it did not. A different identity or workspace scope can point at different memory.
The Codex wrapper must be on your PATH, and the local daemon must be running. Start with the installation checklist. This workflow transfers selected memory; it does not convert a Claude transcript into a Codex transcript.
What the cross-tool eval measured
In our small cross-runtime regression suite, OnlyBots and written handoffs both passed 12/12 runs in each direction. OnlyBots used 21.5% less API spend for Codex-to-Claude and 22.0% less for Claude-to-Codex than that written-handoff control. These are six tasks with two repeats per direction.
The control wrote a note at every boundary. A stronger update-only handoff was tested separately on two tasks; it is not the same comparison. These numbers are model API costs on synthetic tasks, not customer savings or a comparison against every memory product. Read the results and methodology before applying them to your workload.
If you are staying in one tool, native resume may be the simpler and cheaper choice.