Skip to main content
Glama

Transfer session to Codex (free)

codex_transfer

Import a Claude Code session transcript into a persistent Codex thread and return a resume command to continue the exact conversation in Codex.

Instructions

Hand off the current Claude Code session to a resumable Codex thread.

Imports a Claude session transcript (.jsonl) into a persistent Codex thread via codex app-server and returns resume_command (codex resume <thread_id>) to continue that exact conversation in Codex (TUI or App). Free — no model call and no token spend; it is a local file conversion, typically seconds. It does create a thread in $CODEX_HOME (so it is not read-only) but never edits your working tree.

Pass transcript_path: the current session's transcript is the newest *.jsonl under ~/.claude/projects//. If that is ambiguous — for example, more than one recent transcript could be the current session — ask the user which one to transfer. Transferring a still-live session creates a NEW thread each call — Codex dedups only a byte-identical transcript — so this is not idempotent for an active session.

Identifiers the app-server reports (the imported thread id and $CODEX_HOME) are validated: a drifted, oversized, or malformed value fails as cli_contract_changed rather than producing a corrupt resume_command or importing into the wrong home. resume_command is POSIX shell syntax.

codex_status (free) can confirm Codex is installed and authenticated beforehand.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_rootNoAbsolute path to the target repo root — pass it (or an MCP root) to target the intended repo; otherwise the call falls back to the server's own cwd and sets meta.workspace_warning.
transcript_pathYesAbsolute path to the Claude Code session transcript (.jsonl) to hand off to Codex. Must be an existing, non-empty .jsonl file under ~/.claude/projects. Find the current session's transcript as the newest *.jsonl under ~/.claude/projects/<cwd-slug>/. If that is ambiguous — for example, more than one recent transcript could be the current session — ask the user which one to transfer.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only say readOnlyHint=false and idempotentHint=false; the description enriches these substantially: it creates a thread in $CODEX_HOME (hence not read-only), never edits the working tree, is not idempotent for active sessions (new thread per call), validates identifiers and fails as cli_contract_changed, and returns a POSIX resume_command. This fully explains the side effects and failure behavior beyond the structured hints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is longer than minimal, but each paragraph earn its place: it front-loads the core purpose, then covers side effects, usage nuances, validation, and preflight. It is structured and readable, though slightly verbose compared to a two-sentence ideal. Still well-organized and not bloated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with moderate complexity (local file conversion, CLI interaction, side effects), the description covers everything an agent needs: what it does, the output (resume_command), non-idempotency, validation behavior, and a clear pointer to codex_status for prerequisites. The existing output schema covers return values, so no additional return description is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema descriptions for transcript_path and workspace_root already contain the key guidance (newest .jsonl, ambiguity ask user, workspace fallback). The main description largely reiterates this, adding little new meaning beyond what the schema provides. Baseline 3 is appropriate because the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource: "Hand off the current Claude Code session to a resumable Codex thread." It clearly distinguishes this from siblings like codex_status (which confirms installation) and codex_consult/delegate (which perform codex queries/tasks), by focusing on session transfer and returning a resume_command.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context on when to use it (hand off an active Claude session to Codex) and a practical preflight pointer: "codex_status (free) can confirm Codex is installed and authenticated beforehand." It also explains ambiguity handling (ask the user which transcript to transfer). It lacks an explicit when-not-to-use or direct comparison with alternatives like codex_consult, so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/briandconnelly/codex-in-claude'

If you have feedback or need assistance with the MCP directory API, please join our Discord server