↝ session-migrate
Carry the conversation forward.
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
- CLI reference
- Session catalog
- Compatibility details
- Troubleshooting
- Format research and validation
- Data handling and architecture
The demo above is generated by the real CLI from synthetic, credential-free fixtures. Watch the MP4 or reproduce it.
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file session_migrate-0.5.2.tar.gz.
File metadata
- Download URL: session_migrate-0.5.2.tar.gz
- Upload date:
- Size: 195.6 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95b76c0159a2afbf3acd83ff2953b3f2f571d0aee160d8a91016d8eed575cd3e
|
|
| MD5 |
7c36252d5801e4969f39687a46fdf42f
|
|
| BLAKE2b-256 |
42124c1fd2d4180390f8d42807cc8fe89431858413f67bca2375939d8e8e2bb5
|
File details
Details for the file session_migrate-0.5.2-py3-none-any.whl.
File metadata
- Download URL: session_migrate-0.5.2-py3-none-any.whl
- Upload date:
- Size: 73.3 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
064a3163c65f1601b132d07b21020b1b72208f1a957b3771db7a2bf498ac68f3
|
|
| MD5 |
4f3b96c709049809c7fec0ee09cd65d8
|
|
| BLAKE2b-256 |
01e5534d7a52f1377ca3cbb220e9f7894a04f7999a578aa5ec0c0073eb0b0831
|