Skip to main content

↝ session-migrate

Carry the conversation forward.

PyPI version Python versions MIT license Project website

session-migrate converting a Claude Code session into a native Codex session

Move local coding-agent sessions between Claude Code, Codex, Pi, OpenCode, and GitHub Copilot CLI.

Install

uv tool install session-migrate

No uv? Use the standalone installer:

curl -LsSf https://raw.githubusercontent.com/xhluca/session-migrate/main/install.sh | sh

pipx install session-migrate works too. Python 3.11+ and Linux are currently supported. The full command is session-migrate; smigrate is the shorthand.

Quick start

Inspect any native transcript without printing its conversation:

smigrate inspect ~/.claude/projects/-work/SESSION.jsonl

Move a Claude session into Codex and resume it from the same project directory:

smigrate transfer SESSION_UUID --from claude --to codex --cwd "$PWD"
codex resume NEW_SESSION_UUID

Or find an older session by title first:

smigrate catalog refresh
smigrate catalog search "authentication refactor"
smigrate transfer --catalog-id RESULT_ID --to pi

Compatibility

Source ↓ / Target → Claude Codex Pi OpenCode Copilot
Claude Code
Codex
Pi

Claude, Codex, and Pi are sources and targets. OpenCode and Copilot are currently target-only. Same-format migration is intentionally rejected. Antigravity and Cursor remain fail-closed until they expose supported transcript import APIs.

What survives

  • User and assistant messages, in order
  • Tool calls and their linked results
  • Supported inline images
  • Portable compaction summaries
  • Native session identity, discovery, and resume metadata

Anything target-specific is counted in a content-free migration manifest. The source session is never modified.

How it works

native session → validated event timeline → native target → resume

Each 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.

More

The demo above is generated by the real CLI from synthetic, credential-free fixtures. Watch the MP4 or reproduce it.

session-migrate project website

Contributing

git clone https://github.com/xhluca/session-migrate.git
cd session-migrate
uv sync --dev
uv run pytest

See the development guide before changing a native adapter. New formats need sanitized fixtures and a real native-resume oracle.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

session_migrate-0.5.1.tar.gz (195.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

session_migrate-0.5.1-py3-none-any.whl (73.4 kB view details)

Uploaded Python 3

File details

Details for the file session_migrate-0.5.1.tar.gz.

File metadata

  • Download URL: session_migrate-0.5.1.tar.gz
  • Upload date:
  • Size: 195.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for session_migrate-0.5.1.tar.gz
Algorithm Hash digest
SHA256 90fb56c8e63ec544b5594ee3d11e8d892cc0250ac6c9b4a4411e2fda027f3a78
MD5 7d527b8d57241f2b30cbeaa8f6c10312
BLAKE2b-256 559a5fd279584d30c9aa4b9f2885cfc0f5dd193de8a97b806a754137428e7b97

See more details on using hashes here.

File details

Details for the file session_migrate-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: session_migrate-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 73.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for session_migrate-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a623026bd3548c711c2863be92277da6d5a8bd22cd8b349b2021cd377f282d9
MD5 7a41409824a239186489429e0cf86ad4
BLAKE2b-256 035b38e4977536db10829dcc0806dab1d76d266c5ced3392e770fcab4a1a16a9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page