{"slug": "session-migrate-migrate-coding-agent-sessions-across-claude-code-codex-pi", "title": "Session-migrate: Migrate coding agent sessions across Claude Code, Codex, Pi", "summary": "Session-migrate, a new open-source tool from developer xhluca, enables migration of coding agent sessions among Claude Code, Codex, Pi, OpenCode, GitHub Copilot CLI, Antigravity CLI, Cursor Agent, and Mistral Vibe, supporting 64 ordered routes. The tool, installable via uv, pipx, or a standalone installer, preserves user and assistant messages on every route, recreates session identity, and deliberately omits private or signed thinking traces. It is currently supported on Python 3.11+ and Linux.", "body_md": "**Migrate your sessions to any harness.**\n\nMove coding agent sessions among **Claude Code**,\n**Codex**, **Pi**, **OpenCode**,\n**GitHub Copilot CLI**, **Antigravity CLI**,\n**Cursor Agent**, and **Mistral Vibe**.\n\n```\nuv tool install session-migrate\n```\n\nNo `uv`\n\n? Use the standalone installer:\n\n```\ncurl -LsSf https://session-migrate.github.io/install.sh | sh\n```\n\n`pipx install session-migrate`\n\nworks too. Python 3.11+ and Linux are currently\nsupported. The full command is `session-migrate`\n\n; `smigrate`\n\nis the shorthand.\nAlready installed? Run `uv tool upgrade session-migrate`\n\n.\n\nInspect any native transcript without printing its conversation:\n\n```\nsmigrate inspect ~/.claude/projects/-work/SESSION.jsonl\n```\n\nMove a Claude session into Codex and resume it from the same project directory:\n\n```\nsmigrate transfer SESSION_UUID --from claude --to codex --cwd \"$PWD\"\ncodex resume NEW_SESSION_UUID\n```\n\nOr find an older session by its native title/name first:\n\n```\nsmigrate catalog refresh\nsmigrate catalog search \"oauth refresh\" --format claude\nsmigrate transfer --title \"oauth refresh\" --from claude --to pi\n```\n\nSearch is case-insensitive and every word must match, in any order. It searches native titles, names, and IDs—not conversation bodies. A few useful patterns:\n\n```\n# “Fix flaky PostgreSQL timeout” also matches this reversed keyword order.\nsmigrate catalog search \"timeout postgres\"\n\n# Find a release conversation among archived Codex sessions from this month.\nsmigrate catalog search \"release notes\" --format codex \\\n  --lifecycle archived --since 2026-08-01T00:00:00Z\n\n# Opt in to matching a project directory when the title is vague.\nsmigrate catalog search \"checkout api\" --include-paths\n```\n\n`catalog refresh`\n\nis exhaustive inside the default, environment-selected,\nregistered, and explicitly discovered roots. It does not crawl your whole disk.\n\nChoose the route on the [project website](https://session-migrate.github.io/),\nor replace the three bracketed values yourself:\n\nFollow\n\n[https://session-migrate.github.io/llms.txt]to migrate a session from`[SOURCE]`\n\nto`[TARGET]`\n\n. Session:`[UUID OR TITLE]`\n\nThe linked procedure is sandbox-tested with both Claude Code and Codex. See the\n[agent workflow and verification](https://github.com/xhluca/session-migrate/blob/main/docs/coding-agent-instruction.md).\n\n- Claude Code\n- Codex CLI\n- Pi\n- OpenCode\n- GitHub Copilot CLI\n- Antigravity CLI\n- Mistral Vibe\n- Cursor Agent (experimental, pinned, text only)\n\nEvery listed format can be a source or target: 64 ordered routes, including same-format portable rewrites. Cursor deliberately transfers only ordered user/assistant text and is pinned to one exact Linux build; it is not a vendor-supported import API. Same-format migration creates a new independent session—it is not a byte-for-byte clone or a live sync.\n\n| Session data | Result | Notes |\n|---|---|---|\n| User and assistant messages | ✓ | Preserved in order on every route |\n| Tool calls and results | ✓ / partial | Preserved when both adapters support the native shape |\n| Images | ✓ / partial | Supported image blocks move; other media is format-dependent |\n| Compaction summaries | ✓ / partial | Recreated where the target has a portable equivalent |\n| Readable reasoning | Vibe-only portable rewrite | Vibe keeps its explicit readable field when rewritten to Vibe; other/private/signed traces never move |\n| Session name, ID, and picker entry | Recreated | The target gets a new native identity and resume state |\n| Branches, forks, and subagents | Not flattened | Cataloged separately where detectable; migrate the parent session |\n| Private or signed thinking | No | Model/provider-bound traces are deliberately omitted |\n| Auth, hooks, policies, MCP, and runtime config | No | These remain with the source client |\n\nEvery omission or transformation is counted in a content-free migration\nmanifest. The source session is never modified. Cursor intentionally accepts\ntext only. See\n[Pi thinking traces](https://github.com/xhluca/session-migrate/blob/main/docs/pi-thinking-traces.md).\n\n```\nnative session → validated event timeline → native target → resume\n```\n\nEach reader projects a versioned native transcript into a small ordered model. Each writer then emits only structures verified against the target CLI. This is session migration, not text export: the target receives a discoverable, resumable native session.\n\n[CLI reference](https://github.com/xhluca/session-migrate/blob/main/docs/cli-reference.md)[Coding-agent instruction](https://github.com/xhluca/session-migrate/blob/main/docs/coding-agent-instruction.md)[Session catalog](https://github.com/xhluca/session-migrate/blob/main/docs/session-catalog.md)[Compatibility details](https://github.com/xhluca/session-migrate/blob/main/docs/format-compatibility.md)[Troubleshooting](https://github.com/xhluca/session-migrate/blob/main/docs/troubleshooting.md)[Format research and validation](https://github.com/xhluca/session-migrate/blob/main/docs/validation-report.md)[Data handling and architecture](https://github.com/xhluca/session-migrate/blob/main/docs/architecture.md)[Antigravity format](https://github.com/xhluca/session-migrate/blob/main/docs/antigravity-format.md)[Experimental Cursor format](https://github.com/xhluca/session-migrate/blob/main/docs/cursor-format.md)[Mistral Vibe format](https://github.com/xhluca/session-migrate/blob/main/docs/vibe-format.md)\n\nThe Antigravity and Cursor adapters are clean-room, unofficial, and\nversion-pinned. Their independently observed formats are published separately:\n[Antigravity research](https://github.com/xhluca/antigravity-session-interoperability)\nand [Cursor research](https://github.com/xhluca/cursor-session-interoperability).\n\nThe demo above uses real native casts recorded with the same tmux + asciinema\napproach as agent-talk. Claude diagnoses a boundary bug in a small project; the\nmigrated session is reopened in Pi, which applies the proposed patch and runs\nthe regression test. It shows the source TUI, the migration command, the shared\nhistory, and the continued target session. The website plays those casts\ndirectly in JavaScript; the README animation is rendered from that same scene.\nThe same source session is also continued in\n[Claude → Codex](https://raw.githubusercontent.com/xhluca/session-migrate/main/docs/assets/demo-codex.gif).\n[Watch the larger-text Pi video](https://github.com/xhluca/session-migrate/raw/main/docs/assets/demo-pi.mp4),\n[watch the larger-text Codex video](https://github.com/xhluca/session-migrate/raw/main/docs/assets/demo-codex.mp4),\nor [reproduce both](https://github.com/xhluca/session-migrate/blob/main/scripts/render-demo.sh).\nThe recorder uses disposable credential copies only to drive the native clients;\nthe published assets contain only the controlled demo project and omit account\nstatus.\n\n```\ngit clone https://github.com/xhluca/session-migrate.git\ncd session-migrate\nuv sync --dev\nuv run pytest\n```\n\nSee [the development guide](https://github.com/xhluca/session-migrate/blob/main/docs/development.md)\nbefore changing a native\nadapter. New formats need sanitized fixtures and a real native-resume oracle.", "url": "https://wpnews.pro/news/session-migrate-migrate-coding-agent-sessions-across-claude-code-codex-pi", "canonical_source": "https://github.com/xhluca/session-migrate", "published_at": "2026-08-24 20:44:24+00:00", "updated_at": "2026-08-24 21:13:30.657312+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "ai-agents"], "entities": ["session-migrate", "xhluca", "Claude Code", "Codex", "Pi", "OpenCode", "GitHub Copilot CLI", "Cursor Agent"], "alternates": {"html": "https://wpnews.pro/news/session-migrate-migrate-coding-agent-sessions-across-claude-code-codex-pi", "markdown": "https://wpnews.pro/news/session-migrate-migrate-coding-agent-sessions-across-claude-code-codex-pi.md", "text": "https://wpnews.pro/news/session-migrate-migrate-coding-agent-sessions-across-claude-code-codex-pi.txt", "jsonld": "https://wpnews.pro/news/session-migrate-migrate-coding-agent-sessions-across-claude-code-codex-pi.jsonld"}}