You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codex code-mode tool calls (custom_tool_call with a string input) break conversion to opencode and lose the result for claude_code #104
error: cannot convert to opencode: `opencode import` failed: Error: Unexpected error
Expected object, got "text(await tools.exec_command({cmd:\"cat marker.txt\",max_output_tokens:1000}));\n" at ["state"]["input"]
(It also leaves an empty session behind in opencode.)
--with claude_code writes a session that resumes, but the tool's result is missing: asked about it, the resumed model says the file read never returned anything.
--with pi came through fine in the same test.
The two records involved (from ~/.codex/sessions/..., trimmed):
{"type":"response_item","payload":{"type":"custom_tool_call","status":"completed","call_id":"call_bb06566fce2b4dc9bc3d78aeccea79c7","name":"exec","input":"text(await tools.exec_command({cmd:\"cat marker.txt\",max_output_tokens:1000}));\n"}}
{"type":"response_item","payload":{"type":"custom_tool_call_output","call_id":"call_bb06566fce2b4dc9bc3d78aeccea79c7","output":[{"type":"input_text","text":"Script completed\nWall time 0.2 seconds\nOutput:\n"},{"type":"input_text","text":"{\"chunk_id\":\"61df54\",\"wall_time_seconds\":0.000007394,\"exit_code\":0,\"original_token_count\":8,\"output\":\"The harbour gate code is 4471.\\n\"}"}]}}
Two things look relevant: the call's input is a string rather than a JSON object (opencode wants an object), and the output is an array of input_text blocks rather than a string, which may be why the result is dropped for Claude Code.
To reproduce: in a folder with a marker.txt, run codex exec "Read marker.txt and tell me what it says", then txcript continue <that id> --from codex --with opencode --no-resume (and --with claude_code).
Minor, same run: the Codex rollout files txcript writes are named by UTC time (rollout-2026-11-15T03-52-12-…), while Codex names its own by local time (rollout-2026-11-15T14-50-58-…).
Activity
NishantJoshi00 commentedon Nov 17, 2026
Thanks @davidj4tech, nice find. Code mode is the default in Codex now, so this was biting real sessions. Fixed in #109.