Structured handoff between Claude Code and Codex
Stable v0.5.1 lets you continue the same task in a new Claude Code or
Codex session. This is not native resume, not a transferred session, and not a
lossless copy of the source transcript.
Commands
rein handoff --last --from claude --to codex --dry-run
rein handoff claude:SESSION_ID --to codex
rein handoff claude:SESSION_ID --to codex --no-launch
rein handoff list --json
rein handoff inspect HANDOFF_ID --json
rein handoff export HANDOFF_ID --format markdown --out ./handoff.md
rein resume claude:SESSION_ID --with codex --dry-run
rein resume --with is a structured handoff convenience alias. It still starts
a new destination session.
Directions in v0.5.1
| Source | Claude dest | Codex dest |
|---|---|---|
| Claude Code | same-vendor native resume | structured handoff |
| Codex CLI | structured handoff | same-vendor native resume |
| Gemini CLI | structured handoff (source-only) | structured handoff (source-only) |
| OpenCode | structured handoff (source-only) | structured handoff (source-only) |
| Grok Build | structured handoff (source-only) | structured handoff (source-only) |
| Kimi Code CLI | structured handoff (source-only) | structured handoff (source-only) |
Gemini CLI, OpenCode, Grok Build, and Kimi Code CLI are not handoff destinations.
First reply
The destination’s first reply must restate five bullets before mutation: current goal and latest user request; critical constraints; changed files and test state; missing capabilities or uncertain evidence; proposed next action.
Safety
--dry-runplans without launching.--allow-warning IDacknowledges one exact warning. No wildcards.- Wrong Git repository: exit
5. - Non-TTY dest launch: exit
7. - Untested agent version: exit
5unless--allow-untested. - Capsules stay under
$REINSTATE_HOME/handoffs/and are excluded from sync.
See the feature map, CLI reference, and getting started.
Prerequisites
- Stable
v0.5.1installed (rein version --json) - Apple Silicon macOS or native Windows x64 for certified dest-ack
- A logged-in destination Claude Code or Codex CLI in the fail-closed range
- The source session on this device; dest launch needs a real TTY
Expected evidence
--dry-run --jsonreportsmodestructured handoffand a dest argv without CR/LF- Live dest first-reply restates the five bullets before mutation
rein handoff list --jsonkeys aremodeandhandoffs- Marker files in the workspace are unchanged unless you later ask the dest to edit
Failure paths
| Symptom | Cause | Recovery |
|---|---|---|
Exit 5 |
Wrong repo, untested agent, or unsupported dest | Use the source workspace; pin a supported Claude/Codex version |
Exit 7 |
Unacknowledged warning or non-TTY dest launch | Pass each --allow-warning ID; run in a real terminal |
| Dest theme/trust hang | Dest home not trusted | Keep dest CLAUDE_CONFIG_DIR / CODEX_HOME; do not copy oauth files |
| No dest session file | Dest TUI never started | Launch from a local console, not a detached SSH PTY |
See troubleshooting.
Security boundaries
- Capsules are owner-only under
$REINSTATE_HOME/handoffs/and excluded from sync - Known credentials stay excluded; session text can still contain secrets — review the projection
--no-redactis refused for Grok sources- Dest argv never includes
--dangerously-skip-permissions