openai/codex-plugin-cc · error · Error
This Codex version does not support Claude session transfer.
Error message
This Codex version does not support Claude session transfer. Update Codex with `npm install -g @openai/codex@latest`, then retry.
What it means
Thrown by importExternalAgentSession when the RPC call 'externalAgentConfig/import' is rejected with rpcCode -32601 (JSON-RPC method not found). That code means the connected Codex app-server does not implement the external-agent import method, i.e. the installed Codex is older than the feature. The error is wrapped with { cause: error } preserving the original RPC failure.
Source
Thrown at plugins/codex/scripts/lib/codex.mjs:1073
});
}
export async function importExternalAgentSession(cwd, options = {}) {
const availability = getCodexAvailability(cwd);
if (!availability.available) {
throw new Error("Codex CLI is not installed or is missing required runtime support. Install it with `npm install -g @openai/codex`, then rerun `/codex:setup`.");
}
if (!options.sourcePath) {
throw new Error("A Claude session source path is required.");
}
return withDirectAppServer(cwd, async (client) => {
emitProgress(options.onProgress, "Importing Claude session into Codex.", "transferring");
try {
await requestExternalAgentSessionImport(client, externalAgentSessionMigration(options.sourcePath, cwd));
} catch (error) {
if (error?.rpcCode === -32601) {
throw new Error(
"This Codex version does not support Claude session transfer. Update Codex with `npm install -g @openai/codex@latest`, then retry.",
{ cause: error }
);
}
throw error;
}
const threadId = importedThreadIdForSource(options.sourcePath);
if (!threadId) {
const stderr = cleanCodexStderr(client.stderr);
throw new Error(
`Codex reported that the Claude import completed, but did not record an imported thread.${stderr ? `\n${stderr}` : " Check the Codex app-server logs for the underlying import error."}`
);
}
emitProgress(options.onProgress, `Claude session imported (${threadId}).`, "completed", { threadId });
return {
threadId,
stderr: cleanCodexStderr(client.stderr)
};View on GitHub (pinned to db52e28f4d)
Solutions
- Upgrade Codex: npm install -g @openai/codex@latest.
- Stop any running shared broker (so a fresh app-server spawns from the new binary) then retry.
- Confirm 'codex --version' shows a version that includes externalAgentConfig/import.
- If a stale broker persists, clear the session dir's broker artifacts or reboot to release the socket.
Example fix
// before
await importExternalAgentSession(cwd, { sourcePath }) // throws -32601 on old codex
// after
// npm install -g @openai/codex@latest
// (restart the broker / new terminal)
await importExternalAgentSession(cwd, { sourcePath }) Defensive patterns
Strategy: try-catch
Validate before calling
// Probe version support before importing if you can query it; otherwise rely on the catch. // After upgrade, confirm: codex --version reports a version that supports externalAgentConfig/import.
Type guard
function isMethodNotFound(error) {
return error?.rpcCode === -32601;
} Try / catch
try {
await importExternalAgentSession(cwd, { sourcePath });
} catch (error) {
if (error?.rpcCode === -32601 || /does not support Claude session transfer/.test(error.message)) {
// instruct upgrade, then offer to retry after npm install -g @openai/codex@latest
} else {
throw error;
}
} Prevention
- Keep Codex on @latest so the import RPC is available.
- Restart the broker after upgrading so an old app-server is not reused.
- Surface the version requirement in transfer docs.
- In CI, assert the installed version supports external-agent import.
When it happens
Trigger: Calling importExternalAgentSession against a Codex app-server built before the externalAgentConfig/import method shipped. The request reaches a live (but old) app-server, which returns -32601, caught in the try/catch around requestExternalAgentSessionImport.
Common situations: A pinned older @openai/codex version is installed. The broker started a previously-installed codex binary that has since been partly upgraded. A system-wide old Codex shadows the global npm install on PATH.
Related errors
- A Claude session source path is required.
- Codex reported that the Claude import completed, but did not
- Codex CLI is not installed or is missing required runtime su
- Could not identify the current Claude transcript. Retry with
- Claude session source must be a JSONL file: ${sourcePath}
AI-assisted analysis of openai/codex-plugin-cc@db52e28f4d (2026-08-13).
Data as JSON: /api/errors/0a0c8aa830a37787.
Report an issue: GitHub.