codex debug trace-reduce fails when request history adds internal metadata to a prior tool_search_call
What version of Codex CLI is running?
Running codex app-server and codex debug trace-reduce on the trace.
Occurred on servers running both codex-cli 0.143.0-alpha.21 and codex-cli 0.143.0-alpha.31
What subscription do you have?
Pay-as-you-go API key
Which model were you using?
Observed on trace output of gpt-5.5
What terminal emulator and version are you using (if applicable)?
Not terminal-dependent. Repro is a noninteractive codex debug trace-reduce command.
What platform is your computer?
Original trace producer:
- AWS
m6i.4xlarge,x86_64- Ubuntu 22.04 LTS / Jammy
- AMI:
ami-04680790a315cd58d - AMI name:
ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-20260218
Explanation
codex debug trace-reduce fails on a rollout trace produced by codex --strict-config app-server
The app-server produced trace contains this shape. First, an inference response records a completed tool_search_call:
{
"response_id": "resp_example",
"output_items": [
{
"type": "tool_search_call",
"status": "completed",
"call_id": "call_example",
"arguments": {
"query": "spawn subagent launch manage agents report result",
"limit": 10
},
"execution": "client"
}
]
}
Then the next inference request replays the same logical call in its input array, but with internal metadata attached:
{
"input": [
{
"type": "message",
"role": "user",
"content": [
{
"type": "input_text",
"text": "start"
}
]
},
{
"type": "tool_search_call",
"status": "completed",
"call_id": "call_example",
"arguments": {
"query": "spawn subagent launch manage agents report result",
"limit": 10
},
"execution": "client",
"internal_chat_message_metadata_passthrough": {
"turn_id": "turn_example"
}
}
]
}
Problematic difference:
{
"type": "tool_search_call",
"status": "completed",
"call_id": "call_example",
"arguments": {
"query": "spawn subagent launch manage agents report result",
"limit": 10
},
- "execution": "client"
+ "execution": "client",
+ "internal_chat_message_metadata_passthrough": {
+ "turn_id": "turn_example"
+ }
}
The original production trace had real generated IDs; this report uses call_example, resp_example, and turn_example in the sanitized repro.
Reducer output:
$ npx -y @openai/codex@0.143.0-alpha.31 debug trace-reduce \
-o /tmp/codex-trace-reducer-repro-min/state.json \
/tmp/codex-trace-reducer-repro-min
Error: model-visible call id call_example was reused with different content
Why it appears to fail:
- The same logical
tool_search_callappears once in a response and later in a request. - The
call_id,arguments,status, andexecutionare the same. - The later request-side copy has extra internal metadata.
- The reducer appears to compare the full JSON body for
tool_search_call. - That makes
internal_chat_message_metadata_passthroughpart of equality. - The reducer then sees the same model-visible
call_idwith different content and aborts.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗