Skip to content

Codex App 0.169.0-alpha.11.1: in-app browser ambient state saved as function_call_output without call_id, threads permanently 400 #61770

Closed as duplicate

Description

@lilitao

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?

  1. ~/.codex/config.toml with a custom provider, wire_api = "responses", on a gateway that validates call_id strictly (this is correct per the Responses contract; OpenAI itself also rejects it).
  2. Run Codex App core 0.169.0-alpha.11.1. In an existing thread, open an in-app browser tab (@Browser) so inAppBrowserContext state exists.
  3. Send any prompt. Turn fails with the message above.
  4. 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_output carrying internal_chat_message_metadata_passthrough.additional_context_tool_output = true: 2 - both name=browser_tabs, namespace=agent, both missing call_id, both written by core 0.169.0-alpha.11.1. (Now 0, after manual repair.)
  • function_call with name = "browser_tabs": 0 across the whole library. Core never emits the call these outputs answer, so call_id cannot 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 synthetic call_id is not a sufficient repair either.
  • Healthy user messages carrying the identical state inside <external_browser_tabs>, written by 0.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_tabs through the inline channel into the user message as 0.167.x did (recommended - it is environment state, not a tool result, and kind:"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_call and carry its real call_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

  1. added
    app
    on Nov 16, 2026
  2. added
    bug
    tool-calls
    session
    custom-model
    on Nov 16, 2026
  3. github-actions commented on Nov 16, 2026

    @github-actions
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbrowserbugcustom-modelsessiontool-calls

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions