- Python 100%
| cc_sync | ||
| .gitignore | ||
| pyproject.toml | ||
| README.md | ||
cc-sync
Sync /resume history between Codex CLI and Claude Code. Conversations
imported into either tool show up in its /resume picker with full user +
assistant message history.
Install
# pipx (recommended, isolated env)
pipx install git+https://github.com/vipul-sharma20/cc-sync.git
# or from a local clone
pip install -e .
# or skip installing entirely
python3 -m cc_sync status
No dependencies outside the Python 3.10+ standard library.
Usage
# see what you have
cc-sync status
# preview before writing anything
cc-sync codex-to-claude --dry-run
cc-sync claude-to-codex --dry-run
# import
cc-sync codex-to-claude
cc-sync claude-to-codex
Both directions can be run independently or together. Order doesn't matter.
What gets synced
User messages and assistant text responses, session metadata (cwd, timestamps),
and — for the Codex direction — sqlite thread registration so sessions appear
in /resume.
Tool calls, file diffs, reasoning tokens, and usage stats are not transferred. They're tool-specific and not actionable on the other side.
Idempotency
Re-running is safe. Each import embeds the source session ID (sourceId in
Claude Code entries, source_session_id in Codex session_meta). Subsequent
runs detect these and skip already-imported sessions.
$ cc-sync codex-to-claude
0 converted, 20 skipped (already imported)
Backups
Backups are created automatically before every write operation. Codex's
history.jsonl and state_5.sqlite are copied with a .bak.<timestamp>
suffix. Backups are never cleaned up automatically.
Custom data directories
cc-sync --codex-home /path/to/.codex --claude-home /path/to/.claude status
Or via environment variables: CODEX_HOME, CLAUDE_HOME.
Project structure
cc_sync/
cli.py entry point, argument parsing
commands.py codex_to_claude, claude_to_codex, show_status
parsers.py read Codex/Claude Code session JSONL into a common format
builders.py produce session files in the target tool's format
dedup.py scan for already-imported source session IDs
codex_db.py register imported threads in Codex's sqlite index
paths.py resolve data directories
constants.py shared import tags