Skip to content

[BUG] Codex gpt-5.6-sol: "stream disconnected before completion" on /v1/responses (Codex Desktop 26.x) #1944

Description

@dataxad

Summary

After the Codex Desktop app auto-updated (build 26.707.31428, default model gpt-5.6-sol), Codex requests routed through the Headroom proxy started failing mid-stream with:

stream disconnected before completion: error sending request for url (http://127.0.0.1:8787/v1/responses)

Pointing Codex at its native endpoint (bypassing the proxy) makes the disconnects stop, so the proxy's /v1/responses streaming path for this new Codex model is the suspect.

Environment

  • Headroom: 0.31.0 (also reproduced on 0.30.0)
  • OS: macOS 26.5.1, arm64
  • Codex Desktop: build 26.707.31428
  • Model: gpt-5.6-sol, model_reasoning_effort = "ultra"
  • Proxy config: mode=token, backend=anthropic, Codex routed via a [model_providers.headroom] provider (supports_websockets = false), openai_base_url = http://127.0.0.1:8787/v1

Symptom / what the proxy shows

The proxy itself is healthy (steady readyz 200, no crash) and does accept and forward the request — it compresses the payload and forwards to the Codex backend as a streaming POST:

event=proxy_inbound_request method=POST path=/v1/responses ...
[hr_...] /v1/responses compressed 3902200→3890281 bytes (2352 tokens saved ...)
event=outbound_request forwarder=streaming method=POST path=https://chatgpt.com/backend-api/codex/responses ...

…but the client (Codex) then reports stream disconnected before completion against http://127.0.0.1:8787/v1/responses. No 4xx/5xx or exception is logged proxy-side around the disconnect — the stream just doesn't complete. Payloads are large (observed 3.9 MB requests).

This lines up with the cluster of open Responses-streaming issues (#1877, #1880, #1876) and appears specific to the new gpt-5.6-sol / Codex Desktop 26.x Responses protocol.

Repro

  1. Codex Desktop 26.x (model gpt-5.6-sol) wrapped through Headroom (model_provider = headroom, openai_base_url = http://127.0.0.1:8787/v1).
  2. Run a Codex turn with a non-trivial context (large /v1/responses payload).
  3. The turn fails partway with stream disconnected before completion: error sending request for url (http://127.0.0.1:8787/v1/responses).

Workaround: comment out model_provider/openai_base_url in ~/.codex/config.toml so Codex talks to its native endpoint directly — disconnects stop.

Possibly related (separate, happy to file on its own)

On the same new Codex Desktop, with the proxy's memory feature enabled, every Codex /v1/responses call was rejected upstream with {"detail":"Store must be set to false"}. Traced to handlers/openai.py forcing payload["store"] = True when memory tools are injected ("forced store=true for Responses memory tool continuation"), which the Codex ChatGPT backend rejects. Disabling memory avoided it. Flagging in case both stem from the updated Codex Responses contract.

Happy to provide more logs (with --verbose) or test a patch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions