Skip to content
  1. AskOnce home
  2. Blog
  3. How to share context between Claude Code and Codex
DocsGet AskOnce
Why doesn’t Codex know what I did in Claude Code?What are the ways to share context?How do I hand off a task by hand?Should I put the context in AGENTS.md or CLAUDE.md?How does AskOnce share context automatically?Questions
AskOnce blog · Guide

How to share context between Claude Code and Codex

Claude Code and Codex keep separate sessions, so neither knows what you asked the other, what it changed or why. Carry that context by hand with a handoff prompt, keep shared rules in AGENTS.md, or let AskOnce give each new chat a short brief of your work in the other tool.

By Parth Chilwerwar · Updated 4 December 2026

Why doesn’t Codex know what I did in Claude Code?

Each tool keeps its own history. Claude Code stores sessions in the .claude folder of your user profile, Codex in the .codex folder, and by default neither reads the other’s.

Both work on the same project files, so Codex can see what changed through the code and git diff. It can’t see the asks, the decisions, the approaches that failed, or the commands and test results behind them. That missing part is why the second tool asks the same questions again or redoes work.

What are the ways to share context?

There are three, and they solve different parts of the problem:

MethodWhat it carriesEffort each switch
Handoff promptWhatever you ask the agent to write downAsk, copy, paste
AGENTS.md / CLAUDE.mdStanding rules: build, test, conventionsNone, but no session history
AskOnceAsks, last message, files, commands, tests, next stepsNone after setup

Most people need standing rules in any case. The choice is how the session itself gets across: by hand, or recorded for you.

How do I hand off a task by hand?

  1. In the tool you are leaving, ask for a handoff with a fixed template. There is one ready to copy in our handoff prompt guide.
  2. Commit, or at least check git status, so the next tool starts from a known state.
  3. Open the other tool in the same project folder and paste the handoff.
  4. Tell it to read the files the handoff names and run the tests before it changes anything.

This works in every tool and costs a minute per switch. It only carries what you remembered to ask for.

Should I put the context in AGENTS.md or CLAUDE.md?

Put your standing rules there, not your session notes. Codex reads AGENTS.md, Claude Code reads CLAUDE.md, and both read them at the start of every session, so a note about yesterday’s task turns into an instruction that goes stale. AGENTS.md vs CLAUDE.md shows how to keep one set of rules for both tools.

How does AskOnce share context automatically?

AskOnce is a free Windows app with a small plugin in each tool. At the end of each turn, the plugin sends what happened to the AskOnce app on your computer. A new chat in the other tool then starts with a brief: the goal, recent asks, the agent’s last message, files changed, commands run, test results and next steps.

The brief is built by fixed rules, not AI, is about 1,500 estimated tokens at most and is secret-scanned before it is shared. Everything stays on your computer; there is no AskOnce server or account. A chat that is already open gets the other tool’s newer work once, with your next message.

It works with Claude Code and Codex (the Codex app and the interactive CLI) on Windows 10 and 11, with OpenCode as an early preview. codex exec, IDE extensions, macOS and Linux are not supported. Setup takes a few minutes: see the docs.

Questions

Can Claude Code read Codex sessions?

Not by default. Claude Code reads its own sessions and your project files. To give it your Codex work, paste a handoff or use a tool such as AskOnce that briefs the new chat.

Do Claude Code and Codex share settings?

No. Claude Code keeps its settings and history in the .claude folder and Codex in the .codex folder of your user profile. Sign-in, history and plugins are separate.

Is AskOnce free?

Yes. AskOnce is free to download and use, with no account. Paid features may come later for new things, such as other platforms or team use.

Stop explaining your project twice.

AskOnce gives each new Claude Code or Codex chat a short, local brief of your work in the other tool. Free, for Windows. Get AskOnce or read the docs.

More guides

  • Hit your Claude Code usage limit? Continue the task in Codex
  • A handoff prompt for Claude Code and Codex
  • AGENTS.md vs CLAUDE.md: what Claude Code and Codex read
  • How to use Claude Code and Codex in the same repo