Skip to main content
Glama

codex_transfer

Convert a Claude session transcript into a persistent Codex thread. Returns a resume command to continue the conversation without token spend.

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 repository root. Pass it (or rely on an MCP root) so the call targets the intended repo; otherwise it falls back to the server's own cwd and meta.workspace_warning is set.
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?

The description fully discloses behavioral traits: it creates a thread (non-read-only), never edits the working tree (non-destructive), is free and local, and is not idempotent for active sessions. Annotations already hint non-read-only but the description adds crucial details about validation, speed, and lack of token spend.

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 front-loaded with the core purpose, then adds necessary details. It is longer than ideal but every sentence serves a purpose (validation, idempotency, fallback). Minor redundancy (ambiguity handling repeated) but overall well-structured.

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?

Given the tool's complexity, the description covers all needed aspects: purpose, parameters, constraints, behavioral notes, and cross-reference to codex_status. Output schema exists, so return values need not be explained, leaving no gaps.

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

Parameters4/5

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

Schema coverage is 100% with descriptions, but the tool description adds significant value: it explains how to resolve ambiguity for transcript_path, defines the fallback behavior for workspace_root, and clarifies validation, going beyond the schema alone.

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 clearly states the tool's purpose: 'Hand off the current Claude Code session to a resumable Codex thread.' It uses a specific verb and resource, and the unique action is well-distinguished from siblings like codex_consult or codex_delegate even without explicit contrast.

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

Usage Guidelines3/5

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

The description implies usage for session transfer but does not explicitly state when to use it vs alternatives like codex_delegate. It mentions codex_status for pre-checking, but lacks when-not-to-use guidance or comparison with other codex tools.

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