What happened?
Exporting a session to Codex (txcript continue <id> --with codex) writes the canonical tool names (Bash, Edit) into function_call lines. The
Codex runtime has no tools by those names — it expects exec_command (with {"cmd": ...}) and apply_patch (custom_tool_call) — so the replayed
history fails validation and the resumed session breaks. Same for results: patch calls need custom_tool_call_output, not function_call_output.
Expected: from_common emits the native Codex tool shapes, the exact reverse of what to_common normalizes (exec_command/shell → Bash,
apply_patch → Edit/Write).
How to reproduce
let common = Transcript { /* contains Tool::Bash { command: "ls", .. } and Tool::Edit { .. } */ };
let native = codex::Codex::from_common(&common).unwrap();
// native lines contain {"type":"function_call","name":"Bash",...}
// and {"type":"function_call","name":"Edit",...} — both unknown to Codex.
Or via CLI: convert any session containing shell/edit calls to Codex and inspect the response_item lines for "name":"Bash" / "name":"Edit".
Automated repro (fails on main, 3 failed): cargo test -p txcript --test integration codex::from_common — the from_common_denormalizes_* tests in
tests/integration/codex.rs.
Versions
- txcript: 0.14.4
- Agents and their versions: Codex CLI (any)
- Operating system: Windows (applies on all platforms)
What happened?
Exporting a session to Codex (
txcript continue <id> --with codex) writes the canonical tool names (Bash,Edit) intofunction_calllines. TheCodex runtime has no tools by those names — it expects
exec_command(with{"cmd": ...}) andapply_patch(custom_tool_call) — so the replayedhistory fails validation and the resumed session breaks. Same for results: patch calls need
custom_tool_call_output, notfunction_call_output.Expected:
from_commonemits the native Codex tool shapes, the exact reverse of whatto_commonnormalizes (exec_command/shell→Bash,apply_patch→Edit/Write).How to reproduce
Or via CLI: convert any session containing shell/edit calls to Codex and inspect the response_item lines for "name":"Bash" / "name":"Edit".
Automated repro (fails on main, 3 failed): cargo test -p txcript --test integration codex::from_common — the from_common_denormalizes_* tests in
tests/integration/codex.rs.
Versions