handofflisted
Install: claude install-skill Misoto22/skills
# Handoff
Mirror a live conversation into the other agent's history, so closing one tool and opening the other finds the work already there.
## Why this is possible at all
Claude Code and Codex converged on the same two mechanisms, which is the whole reason a bridge is cheap:
- **The same hook schema.** `~/.codex/hooks.json` uses Claude Code's shape — `PostToolUse`, `Stop`, `matcher`, `hooks[].command`, even `$CLAUDE_TOOL_ARG_*`. One script registers on both sides.
- **The same storage idea.** Both append one JSON object per line as the conversation runs. Neither writes a conversation only at the end, so a hook can read what has accumulated and translate just that.
They disagree on every field name, and that is all `scripts/formats.py` does:
| Claude Code | Codex |
|---|---|
| no header; `cwd` on every line | `session_meta`, first line only |
| `type:user`, `message.content` | `response_item/message` role=user |
| `type:assistant`, `content[text]` | `response_item/message` role=assistant |
| `content[thinking]` | `response_item/reasoning` |
| `content[tool_use]` | `response_item/function_call` |
| `type:user`, `content[tool_result]` | `response_item/function_call_output` |
| `parentUuid` linked list | file order, `turn_id` per item |
## Two things the existing converters get wrong
Worth knowing before reading their source, because both mistakes look like success.
**A mirror must be its own conversation.** Appending into a history the other tool has open races that to