# Switch from Claude Code to Codex without losing the task

> A cross-CLI handoff when usage limits, model choice, or review needs change: preserve the goal, branch, evidence, and next action.

Canonical HTML: https://canopyide.dev/guides/switch-coding-agents-without-losing-context
Article date: 2026-09-28

A new agent CLI does not inherit another CLI's private conversation. When you switch tools, preserve the task's facts in the repository and a short handoff instead of pasting hours of chat.

## Know what actually transfers

Both CLIs can inspect the same files when launched in the same project. A branch, commit, PR, test log, and short written decision are portable evidence. The conversation history, model settings, account, and usage limits belong to each CLI. Canopy shows supported project and session context, but it does not convert one provider's hidden conversation into another provider's transcript.

## Pause at a stable point

Before switching, ask the first agent to stop editing and report its branch, changed files, commands run, failures, design decisions, and remaining work. Check git status yourself. If the working tree contains partial changes, keep the second agent in a separate worktree or explicitly hand it the same checkout only after the first process is idle. Do not run two code-changing sessions against the same uncommitted files by accident.

## Start the second CLI with a bounded job

Open Codex, Claude Code, or another supported CLI from the intended project checkout. Give it the original acceptance checks, the first agent's concise handoff, and the exact branch or PR to inspect. Ask it to verify the state before editing. For an independent review, keep the second session read-only until it reports evidence-backed findings.

## Use Canopy context as an index

Canopy's Agents rail, Agent Workspace, searchable history, and supported shared context help locate sessions, files, and recent work. Integration depth differs across CLIs; the app's agent-parity document records which connectors currently provide resume, usage, and context features. If a signal is missing for a CLI, use the branch, PR, and explicit handoff as the source of truth.

## Check whether switching helped

A switch can be useful when a limit blocks the current CLI, when another model is better suited to a task, or when you need an independent review. It can also cost time if the second agent repeats the entire investigation. Compare the accepted result, retries, and review effort with a single-CLI workflow. Treat Canopy's displayed cost as an estimate and the provider account as the billing authority.

## Copyable resources

### Cross-CLI handoff

Paste this into the second CLI after filling the facts from the first session.

````text
Goal: [one outcome and acceptance checks]
Repository and checkout: [path, branch, worktree]
Current state: [what works and what is still broken]
Changed files or PR: [paths, commit, PR link]
Evidence: [commands/tests run and exact results]
Decisions already made: [interfaces, constraints, user choices]
Next job for this session: [implement, investigate, or read-only review]
Before editing, inspect git status and the cited files. Tell me if the handoff conflicts with the current repository state.
````

## Frequently asked questions

### Can Codex resume a Claude Code conversation directly?

No. They keep separate conversation histories. Handoff through a branch, PR, files, and a concise task summary.

### Can Canopy move a paid subscription from one CLI to another?

No. Each CLI uses its own provider account, model settings, limits, and billing.

## Sources and further reading

- [Canopy agent integration parity](https://github.com/FluidWorksApp/canopy-ide/blob/main/docs/agent-parity.md)
- [Canopy app README: agent sessions and context](https://github.com/FluidWorksApp/canopy-ide#readme)
- [Claude Code usage and limit guidance](https://support.claude.com/en/articles/14552983-models-usage-and-limits-in-claude-code)

## Related Canopy pages

- [Keep coding-agent context useful between sessions](https://canopyide.dev/guides/keep-agent-context-between-sessions.md)
- [Run Claude Code and Codex side by side without losing the work](https://canopyide.dev/use-cases/parallel-claude-code-codex-agents.md)
- [How to reduce coding-agent token usage without losing the result](https://canopyide.dev/guides/reduce-coding-agent-token-usage.md)
- [Can Claude Code and Codex agents talk to each other in Canopy?](https://canopyide.dev/use-cases/can-claude-code-and-codex-agents-talk-in-canopy.md)
- [Canopy 0.3.4: test tab recovery, OpenCode usage, and Remote](https://canopyide.dev/blog/canopy-034-agent-workflow-release-guide.md)

Canopy runs installed coding CLIs; CLI accounts, model selection, and provider billing remain separate. Check the installed release before relying on version-specific behavior.
