You are halfway through a coding task. Claude Code has explored the repository, made several decisions, edited a few files, and then you hit your usage limit.
The code is still on disk. The harder thing to recover is the reasoning around it:
- what Claude was trying to accomplish
- which approaches it rejected
- what it already changed
- which bugs remain
- which checks still need to run
You do not need to reconstruct that context from memory. Codex can import recent Claude Code work directly, and Claude Code can export the current conversation as a readable transcript when you need a manual handoff.
The important rule is simple: use the conversation to recover intent, but use the repository to establish facts.
Start with Codex's direct Claude Code import
If Claude Code and Codex are installed on the same computer, try the built-in import first. It is the shortest path and can bring over more than a single chat.
In the Codex desktop app:
- Open Settings > Import. If Import is not shown as its own section, look in General for Import other agent setup.
- Start an import and choose Claude Code.
- Import everything, or customize the selection to include only the project and recent chats you need.
- Open the imported project or conversation and continue working.
From an interactive Codex CLI session, enter:
/importThen select Claude Code and the items you want to migrate.
OpenAI's import documentation says the flow can detect supported setup and recent work, including project folders and chats from the last 30 days. It can also import instructions, settings, skills, plugins, MCP configuration, hooks, slash commands, and subagents.
Importing does not delete or replace the Claude Code setup. It creates the corresponding Codex configuration and local project entries, then flags any plugins or connections that still need authorization.
Export the exact Claude Code conversation when import is not enough
Direct import is not always the right route. You may want a portable transcript, need to move the task to another computer, or find that the conversation you need does not appear in the recent-chat list.
Return to the Claude Code conversation and enter:
/exportClaude Code opens a dialog where you can copy the conversation to the clipboard or save it as a plain-text file. You can also provide a filename directly:
/export claude-session.txtAnthropic documents /export [filename] as a built-in command that exports the current conversation as plain text. The output includes messages and rendered tool results, which gives the next agent much more useful context than the final answer alone.
Because /export is a built-in session command, it does not ask the model to write a fresh handoff. That makes it the right first thing to try when model usage is exhausted.
Continue in the same repository
Open the repository Claude Code was editing, start a Codex conversation there, and attach the exported transcript.
Use a continuation prompt like this:
This file contains the transcript of a Claude Code session that stopped
because I reached my usage limit.
Read the transcript and inspect the current repository before continuing.
Treat the repository, git status, and git diff as the source of truth wherever
they differ from the transcript. Determine:
1. The original goal
2. The decisions already made
3. The files that have already changed
4. Any unfinished implementation work
5. Tests that have or have not been run
6. The safest next step
Briefly summarize your understanding, then continue implementing the task.
Do not redo completed work unless inspection shows that it is incorrect.
Run the relevant checks or tests before considering the task complete.This prompt makes the division of responsibility explicit. The transcript explains why the work took its current shape. The working tree shows what actually happened.
Treat Git as the source of truth
Local edits made by Claude Code remain in the working directory after the conversation stops. Codex should inspect at least:
git status
git diffDepending on the project, it may also need to inspect untracked files, recent commits, generated migrations, build logs, or test output.
That check matters because a transcript can lag behind reality. Claude Code may have edited a file after its last explanation, described a change it never completed, or run a command that succeeded only partially.
The safest handoff therefore has two sources:
- The repository, which contains the current implementation
- The conversation, which contains the decisions and constraints behind it
Starting Codex in an empty folder with only the transcript throws away half of that evidence.
Find the raw Claude Code transcript as a fallback
If /export is unavailable or you cannot reopen the conversation, Claude Code also stores session transcripts locally.
By default, the files live at:
~/.claude/projects/<project>/<session-id>.jsonlAnthropic's session documentation describes each line as a JSON object for a message, tool call, or metadata entry. The base path can differ if you set CLAUDE_CONFIG_DIR, and local sessions are removed after 30 days by default unless you change the retention setting.
On macOS or Linux, this command lists the most recently modified transcripts:
find ~/.claude/projects -type f -name '*.jsonl' -print0 \
| xargs -0 ls -lt \
| head -20The JSONL is less pleasant to read than /export output, but Codex can still process it. Attach the relevant file and use the same continuation prompt.
Compress very long sessions into a verified handoff
Long coding sessions accumulate outdated plans, repeated tool output, and dead ends. Giving every token equal weight can make the next session less focused.
For a large transcript, ask Codex to create a concise handoff before it resumes implementation:
Read this Claude Code transcript and inspect the repository.
Create a concise CLAUDE_HANDOFF.md containing:
- Original objective
- Current implementation state
- Important decisions and constraints
- Files changed
- Commands and tests already run
- Known errors or unresolved questions
- Recommended next action
Verify every implementation claim against the repository and git diff.
Exclude abandoned approaches and repetitive tool output.You can then start a clean Codex conversation with the repository and CLAUDE_HANDOFF.md. This preserves the decisions that matter without carrying every intermediate detail into the new context window.
Avoid the two handoff mistakes that lose the most context
First, do not paste only the last few Claude Code messages. They may omit requirements from the start of the conversation, commands that failed, user corrections, or architectural decisions that were never repeated.
Second, do not tell Codex only to "continue where Claude stopped." Without the transcript or a verified handoff, Codex cannot know what Claude believed the next step should be.
For most interrupted sessions, the practical workflow is:
- Try Codex's direct Claude Code import.
- If the chat is missing, run
/exportin Claude Code. - Open the same repository in Codex.
- Attach the transcript.
- Ask Codex to inspect the repository and Git state.
- Let it summarize the remaining work.
- Continue implementation and run the relevant tests.
Hitting a usage limit does not mean abandoning the work. The repository preserves the implementation, the transcript preserves the reasoning, and together they give the next coding agent enough context to take over safely.
The same evidence-first principle sits behind Spring Prompt's public model evaluations: keep the artifacts, check what actually ran, and make decisions from verifiable results. You can also browse more practical AI workflows on the Spring Prompt blog.