Repository navigation
Description
What version of the Codex App are you using (From “About Codex” dialog)?
Codex App 26.1111.2228.0 (MS Store package OpenAI.Codex_26.1111.2228.0_x64__2p2nqsd0c76g0), bundled core cli_version = **0.169.0-alpha.11.1**.Last known-good core on the same threads: 0.167.0-alpha.3.2 / 0.167.0-alpha.4.1, where this same ambient state was delivered inline inside a user message and never produced an error.
What subscription do you have?
plus
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Since upgrading to core 0.169.0-alpha.11.1, a normal user turn in a thread that has an in-app browser tab open records the tab's ambient UI state into the rollout as a standalone function_call_output with no call_id and no matching function_call:
{"type":"response_item","ordinal":2347,"payload":{
"type":"function_call_output",
"id":"fco_01a1e233-b371-7413-8d87-b958fb4a60b0",
"name":"browser_tabs",
"namespace":"agent",
"output":"<in-app-browser-context source=\"ambient-ui-state\">\nThis block is automatically supplied ambient UI state, not part of the user's request. ...",
"internal_chat_message_metadata_passthrough":{
"history_sequence":24,"sampled_through_sequence":0,
"additional_context_tool_output":true,
"client_authored":false,"fallback_token_limit_override":3000}}}call_id is not present in the payload at all (nor empty - absent). Because the item is appended to the rollout, it is replayed on every subsequent request of that thread, so the thread is not failing once, it is bricked from that ordinal onward.
Provider response, stored verbatim in thread_turns.error_json / the task_complete error event:
400 {"request_id":"fba5c41a-6457-402c-b2b4-c6cd73602329","error":{"type":"InvalidParameter",
"message":"Invalid 'call_id': call_id is required for function_call_output."}}
400 {"request_id":"bd1452a5-e27d-4e48-9ced-52e8f17e16a3","error":{... identical ...}}
UI symptom: the turn fails, the thread shows the error, and every retry of the same or any later prompt fails identically. Closing/reopening the thread does not help (the item is in history).
What steps can reproduce the bug?
~/.codex/config.tomlwith acustomprovider,wire_api = "responses", on a gateway that validatescall_idstrictly (this is correct per the Responses contract; OpenAI itself also rejects it).- Run Codex App core
0.169.0-alpha.11.1. In an existing thread, open an in-app browser tab (@Browser) soinAppBrowserContextstate exists. - Send any prompt. Turn fails with the message above.
- Retry the turn, or restart the app and retry: same 400 forever, because the poisoned item is now part of the replayed history.
Observed on this machine, thread 01a1daaf-4eb2-73a1-9e6d-13edfd629e1d (two independent recurrences, 2/2 = 100%):
| time (UTC+8) | injected item | outcome |
|---|---|---|
| 10:33 | main rollout ordinal 2347 | turn 01a1e233-b344-7852 status=failed, request_id fba5c41a-... |
| 11:28 | continuation sidecar ..._01a1e24b-...jsonl ordinal 2398 |
turn 01a1e265 failed, request_id bd1452a5-... |
| 15:34-15:50 | none injected (in-app browser tab closed) | 373 items / ~850 KB of new history, all turns succeed |
Library-wide counters (40 rollout files under ~/.codex/sessions + archived_sessions):
function_call_outputcarryinginternal_chat_message_metadata_passthrough.additional_context_tool_output = true: 2 - bothname=browser_tabs,namespace=agent, both missingcall_id, both written by core0.169.0-alpha.11.1. (Now 0, after manual repair.)function_callwithname = "browser_tabs": 0 across the whole library. Core never emits the call these outputs answer, socall_idcannot be reconstructed after the fact - the item is unrepairable in place, which matches the finding in Standalone injected function_call_output is rejected by strict Responses providers; adding a call_id is not a sufficient repair #45450 that a syntheticcall_idis not a sufficient repair either.- Healthy
usermessages carrying the identical state inside<external_browser_tabs>, written by0.167.x: 7 samples, 5 of them never touched by me. That channel has never produced a single error under the same provider, before or after.
Related-but-different triggers already filed: #42088 (general form), #44723 / #44519 / #41690 (heartbeat + cron automations), #45914 / #45318 (cross-thread send), #43515 (all injected inputs), #46193 (pairing enforced only on replay rebuild, not at the send boundary). What is new here: a plain interactive turn is poisoned purely as a side effect of having an in-app browser tab open, which the user cannot disable except by closing tabs.
What is the expected behavior?
Either
- deliver
inAppBrowserContext/browser_tabsthrough the inline channel into theusermessage as0.167.xdid (recommended - it is environment state, not a tool result, andkind:"untrusted"ambient text should not be posing as a tool output), or - if it must go through the tool-output channel, emit the paired
function_calland carry its realcall_id, so the item satisfies the Responses contract.
Additionally, at the send boundary any function_call_output whose call_id is missing or has no matching function_call in the outgoing input should be dropped/demoted rather than shipped, so a single bad injection can never permanently brick a thread.
Additional information
Origin. The app declares two renderers for the same ambient field, and it is the tool-output one that now gets persisted (app.asar, two occurrences each):
{ field:"inAppBrowserContext", name:"browser_tabs", kind:"untrusted",
render:rQ, renderInline:e=>rQ(e,!0) },
{ field:"inAppBrowserContext", name:"chrome_selection_guidance", kind:"application",
render:function(e){ return e.isOpen && "chrome_tab"===e.source && e.hasSelection ? "..." : "" },
renderInline:()=>"" }The name of that descriptor (browser_tabs) is exactly the name on the orphan output, and namespace:"agent". additional_context_tool_output is present in the core binary's serializer field table (CodexHarnessMetadata: ...retained_source, additional_context_tool_output, client_authored, fallback_token_limit_override, ...; 7 hits in resources/codex.exe).
The inline wrapper was replaced, not disabled. In this build external_browser_tabs - the tag the app itself wrote on 7/7 healthy items under 0.167.x - occurs 0 times in both resources/app.asar (783,750,654 B) and resources/codex.exe (382,514,992 B), while in-app-browser-context (4) and browser_tabs (2) are still in app.asar. So 0.169.0 switched the delivery channel for this field while leaving the payload content unchanged.
No user-facing switch. There is no config key for this injection; ambient-suggestions-enabled governs a different feature. The only mitigation found is to keep in-app browser tabs closed in threads that use a strict Responses provider.
Why repairing the history is fragile (relevant for any recovery/fix). When the thread is resumed after such a failure, the app starts a new continuation sidecar and rolls the replay baseline back to before the failed turn: session_meta.payload.history_base observed as {end_ordinal_exclusive:2342, end_byte_offset:8317700} then {thread_id:"...01a1e24b...", end_ordinal_exclusive:2396, end_byte_offset:81101}. Both repaired ordinals (2347, 2398) ended up outside the new baseline, so an in-place repair of the older file is silently bypassed and the next send injects a fresh orphan. A repair must target the file currently referenced by threads.rollout_path, and ideally the app should refuse to persist an orphan output in the first place.
Reproducer artifacts available (rollout lines with the two quoted request_ids, the two orphan rows, and the 5 untouched 0.167.x healthy rows). Paths/thread ids redacted here; can share the two ~900-byte lines and the history_base meta lines on request.
Activity
github-actions commentedon Nov 16, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action