Are you the author? Sign in to claim
Import your Codex conversations into Claude Desktop and Claude Code, with the sidebar entry, titles, tool calls and perm
Move your Codex conversations into Claude — same list, same titles, tool calls intact.
Codex ships an import that pulls Claude sessions in. Nothing goes the other way, so switching means leaving your history behind. This is that direction: Codex CLI and Codex Desktop into Claude Code and Claude Desktop.
Newest first.
--force treated "Claude replayed the history into the file" and "you answered in it" as the same kind of change and overwrote both, which cost a message. It now tells them apart and refuses the second, naming what would have been deleted and counting only lines somebody typed. Continuing an import also makes Claude fork it and repoint the record at a session of its own; those records are recognised as no longer ours, left alone rather than duplicated, and searched for messages sent there. (#9, #10)npm run import -- --dry-run used to import for real. npm owns --dry-run and --force, parses them as its own config and passes an empty argv on, so the flag never arrived and the write path ran. It now detects the swallowed flag and refuses; npm run import:dry has it baked in. (#6)<oai-mem-citation> block, which Codex Desktop parses back out and never shows. Imports used to end an answer with raw markup; the citation is now a readable metadata line after the reply. (#3)~/.codex/session_index.jsonl, so a conversation is called the same thing on both sides. (#2)local-projects root paths. (#1)On this page — Quick start · How it works · Features · Choosing conversations · Requirements · Safety · Limitations
Reference — CLI · Conversion · Formats
git clone https://github.com/Agentryx-ai/codex-to-claude
cd codex-to-claude
node --experimental-strip-types --experimental-sqlite src/cli.ts list
$ codex-to-claude list
20 conversation(s), 20 after refinements. [vscode:19 cli:1]
By project:
3 Agentryx
2 ReTalk
2 Itineva
1 ModuBoza
1 (no project)
...
$ codex-to-claude import --dry-run # writes nothing
$ codex-to-claude import --title-prefix "[Codex] "
Restart Claude Desktop. The conversations are in the sidebar under the same projects, and you can open and continue them.
Flags belong on node src/cli.ts, not on npm run — see
CLI.
Claude Desktop keeps a conversation in two places, and needs both to show it:
| Layer | Location | Role |
|---|---|---|
| Session record | <app-data>/Claude/claude-code-sessions/<account>/<device>/local_<uuid>.json | Builds the conversation list. Points at a transcript by cliSessionId and cwd. |
| Transcript | ~/.claude/projects/<encoded-cwd>/<cliSessionId>.jsonl | The conversation itself. |
Writing only a transcript leaves it invisible, so this writes both.
~/.codex/sessions/**/rollout-*.jsonl
│
├─ select what Codex Desktop lists
├─ convert rollout items to transcript lines
├─ validate replay invariants
│
├──► ~/.claude/projects/<enc-cwd>/<id>.jsonl
└──► claude-code-sessions/.../local_<uuid>.json
permissionModeOut of scope: the reverse direction (Codex already has it), settings, skills, plugins and MCP servers, anything requiring a network call or an account, and editing conversations you already have.
It was written for Agentryx, an AI-native agent harness in development, which needs conversation history to move between providers. It depends on the on-disk formats of two proprietary desktop apps, and those change on someone else's schedule. That churn is easier to handle in a small project that can be fixed and released on its own. It works without Agentryx.
Codex Desktop groups by project. Conversations without one appear only under Recents, and plenty of people never look at them, so membership is a filter:
| Flag | Imports |
|---|---|
| (default) | everything the sidebar shows |
--projects-only | only conversations in a project |
--projectless-only | only the Recents ones |
--project <name> | one project, by Codex name or path |
--include-archived, --archived-only | include or restrict to archived threads |
--interactive-only | drop codex exec automation runs |
list prints the per-project breakdown first. Further limits: --since-days,
--max, --from, --to, --id. Full flag reference in CLI.
Windows or macOS, and Node.js 22.6 or newer. No dependencies.
Every path resolves per platform: the Claude Desktop session-record store from
%APPDATA%, ~/Library/Application Support or $XDG_CONFIG_HOME, and
~/.codex and ~/.claude from the home directory. Linux follows the same rules
but has not been run there; --sessions-root and --claude-home override any
of it.
This writes into another application's local data, so it stays cautious.
--force.--dry-run prints every target path and writes nothing.--force overrides that for a transcript Claude only rewrote — opening a
conversation makes it replay the history back into the file — and says what it
overwrote. It stops at a transcript holding messages you sent after the
import, naming the first one, and does not offer to override: the flag exists
to get past replay duplicates, not to discard conversation.local_*.json records it
created. Both are listed in its output.| CLI | Commands, every flag, exit codes |
| Conversion | What each Codex item becomes, injected context, permissions, compaction, replay repairs |
| Formats | The on-disk shapes both sides use, reconstructed by observation |
/import, Claude into Codexnpm test
Unofficial, and not affiliated with OpenAI or Anthropic. "Codex" and "Claude" are trademarks of their respective owners. Back up anything you care about.
Apache 2.0, see LICENSE and NOTICE.
You can use, modify and ship this, including commercially. Keep the copyright notice and the NOTICE file, and say what you changed. The license does not grant rights to the project's name or marks.
Manage multiple Claude Code instances in separate git worktrees simultaneously
⚠️ Experimentelle Skill-Sammlung für deutsches Recht (Arbeits-, Gesellschafts-, Insolvenz-, Datenschutz-, Prozessrecht u
191 agents, 155 skills, and 82 plugins cross-compatible with Claude Code, Cursor, and Codex
Manage multiple Claude Code agents from TUI or Web with tmux and git worktrees