Skip to content

macOS desktop: HTTP continuation stalls after tool return; 1011 heartbeat failures and small/no-image TLS errors #57725

Open

Description

@8mdphgg5yn-eng

What version of the Codex App are you using (From “About Codex” dialog)?

Latest inspected installed macOS application: 26.1023.50603, build 22391, branded ChatGPT, bundle identifier com.openai.codex. This value was read from the installed bundle, not an About-dialog screenshot.

Earlier October 27 records were collected with app 26.1021.31345, build 21828. An earlier October 28 runtime inspection found bundled codex-cli 0.164.0-alpha.11.1, while the separately installed terminal CLI was 0.160.0. These are snapshots at different times; they do not establish the exact loaded runtime for every failure or demonstrate that a particular update caused or fixed this problem.

What subscription do you have?

ChatGPT subscription sign-in, rather than a manually supplied API key. The exact subscription tier has not been independently verified for this report.

What platform is your computer?

macOS 27.0.1 at the latest local inspection. Local desktop document-processing workflows, including rendering Word documents and inspecting page images. Private document contents are not needed to describe the failure and are excluded.

What issue are you seeing?

Recurring desktop/Work connection failures prevent sustained work. Some image-heavy requests fail with Broken pipe after approximately 80 seconds; there are also small/no-image TLS failures and HTTP model-continuation send failures after a local tool has already returned. Short successful requests do not restore reliable use.

I am asking maintainers and other users for a supported recovery path and help distinguishing these failure classes. I am not claiming a single established root cause, an account ban, intentional throttling, or that all of the following observations describe one connection.

The recurring error classes in existing local records include:

stream disconnected before completion
Broken pipe (os error 32)
tls handshake eof
error decoding response body
error sending request

The desktop can remain apparently active without further useful output. Locally completed work survives, but the assistant does not reliably continue or deliver it. Other online applications appear normal to me in the same proxy environment; this is a user observation, not proof that every relevant network path is healthy.

1. Concrete tool-return / HTTP-continuation failure

On 2026-10-28, all times below in Beijing time, UTC+8:

Time Observation bound to the affected conversation
20:13:28 The turn started.
20:19:50 The assistant reported that text and a Word draft had been generated and that it would continue layout checks.
20:19:52 A local document-rendering command was invoked.
20:19:54 The tool returned a background-process identifier. Subsequent read-only inspection found the generated Word/PDF files and four rendered page images on disk.
20:21:26, 20:21:29, 20:21:59 The same conversation's codex_http_client::client records show error sending request, transport=responses_http, method=POST.
20:28:08 Another request-send failure was logged for that conversation.

At inspection, no further conversational output followed the tool return and the local turn projection still said inProgress. This is not evidence that the model was still thinking. The tool had returned a process identifier rather than a final process-exit receipt; nevertheless its rendered output files existed. The selected HTTP error records did not include an HTTP response status or an available server request ID. This report does not infer an HTTP 403/429 from a generic send error.

2. Previously captured synthetic WebSocket heartbeat failure

Earlier that day, independent, bounded synthetic probes used generated images and a fixed test prompt, not private document images or the original conversation body. The model was gpt-6.1-sol with max reasoning. These were separate protocol probes, not instrumentation injected into the running desktop application.

  • A 20,526,294-byte JSON request sent as one large message failed through both an OS/TUN socket path and an explicit existing local HTTP-proxy path. They shared infrastructure; neither is a proven physical direct connection.
  • Both completed verified TLS and HTTP 101 upgrade, received a Ping at approximately 20 seconds, then received an actual remote Close 1011, reason keepalive ping timeout, at approximately 80 seconds.
  • The large send callback and queued Pong subsequently failed with EPIPE around 83 seconds. Remote closure preceded the local write error.
  • With identical small request bytes, normal Pong handling survived approximately 103.8 seconds and had completed its response; deliberately suppressing Pong on a separate probe reproduced the approximately 80-second heartbeat close after the response had already completed.
  • Splitting the identical large request into 64 KiB fragments permitted three successful local Pong-write callbacks and kept the connection open for approximately 159.3 seconds, until the probe's local deadline. The large upload and generation did not complete. This was not a successful repair.

This supports a heartbeat-starvation mechanism for those synthetic large sends. It does not establish the precise closing component in the remote service chain, prove that the original native turn emitted the same Close frame, or locate the initial cause of slow upload. Cloudflare response headers do not identify which component originated the close.

3. Upstream backpressure was observed, but its origin remains unresolved

The proxy was Mihomo v1.19.33, with a subscription-provided AnyTLS outbound. Three synthetic uploads were bound to the same actual outbound policy chain using local source-port correlation:

Complete JSON size Approximate progression of the matched proxy upload counter Outcome
1,334,494 bytes 44.2 kB/s Completed and replied OK, approximately 29.7 seconds.
6,001,134 bytes 46.0 kB/s Remote 1011 heartbeat close at approximately 80 seconds.
20,526,294 bytes 42.8 kB/s Remote 1011 heartbeat close, then EPIPE.

Here kB means 1,000 bytes. These are fitted proxy-counter progression rates, not server acknowledgements, advertised bandwidth, or proof of a configured rate limit. Other connections were active, so this was not an exclusive bandwidth test.

Queues accumulated at both the probe-to-proxy socket and the proxy receive side. A strongly time-correlated carrier TCP connection showed approximately 466,640 retransmitted bytes across 40 samples and a 131,072-byte peak send queue. The two OS observation tools were matched to the same TCP socket; association of the probe's internal AnyTLS stream with that carrier remains a strong time-series association, not a direct internal handle binding. Retransmitted bytes are not a measured packet-loss percentage.

Notably, the approximately 6 MB sample failed below 16 MiB. No remote Close 1009 or HTTP 413 was captured in these probes; another reporter's size threshold must not be treated as our measured limit. The subscription provider's server-side statistics are unavailable, so local Wi-Fi/access, the path to the node, node ingress/shared contention, provider policy, and remote backpressure have not been uniquely separated.

4. Small/no-image failures also exist

Separate existing records show a reconstructed active history of approximately 499,726 bytes, with zero images, experiencing TLS EOF/missing-close-notify errors, timeout and HTTP fallback. That reconstruction is not an exact on-wire request size. These errors belong to a different conversation/time window and should not be combined with another thread's Broken pipe as one causal sequence.

A fresh text-only continuation initially completed in approximately 12.9 seconds. Later, after a roughly 3.94 MB encoded image was added, the reconstructed active history was approximately 4.70 MB and 80-second-class failures recurred. Thus neither large-image history nor proxy configuration alone has been established as an explanation for every symptom.

5. Work authentication/background events are separate evidence

Existing desktop/Work logs include timeouts, resets, unexpected EOF and broken pipes. Some connection attempts clustered around 15 seconds, consistent with an inspected client connection timer, but the timer was not logged for every attempt.

Work rendezvous records also include HTTP 401, rejectionReason=expired, followed by automatic recovery in some instances. Background thread-read access denials also occurred, but have not been linked to the stalled foreground turn. Neither observation establishes a general account ban or the cause of the model-request send failures.

What steps can reproduce the bug?

Observed workflow, not a guaranteed clean-state minimal reproducer:

  1. Use the macOS desktop app for a sustained local document task.
  2. Render and inspect page images through tools, then ask the assistant to continue.
  3. In affected runs, observe repeated transport failures or a turn that remains in progress without further output. The most recent documented instance stalled after a rendering tool returned, during HTTP continuation.
  4. Small/no-image conversations can separately fail at TLS/connection stages.

The synthetic probe observations above are already collected evidence. Further active testing has been stopped at the user's request. I would appreciate analysis of the existing evidence and a bounded, supported recovery procedure rather than another open-ended series of retries or proxy changes. Private session identifiers are not published here, and no in-app feedback ID is being invented.

What is the expected behavior?

  • A connection failure should lead to a clear, bounded failure/recovery state instead of indefinitely apparent progress.
  • Completed local work should remain accessible and a tool-returned workflow should have a supported way to resume.
  • Large sends should not indefinitely block necessary heartbeat handling; recovery should account for request bytes as well as token counts.
  • HTTP send failures, WebSocket heartbeat closures, TLS failures and expired Work rendezvous credentials should be distinguishable in diagnostics.

Additional information

Attempts and limits of apparent recovery

Attempt/observation Actual result
Proxy-core restart and node changes during earlier troubleshooting Did not restore dependable use according to subsequent user feedback; not a controlled per-node comparison.
System proxy enabled alongside the existing TUN, keeping node/rules fixed Runtime state was checked; user still reported failure. The setting was reverted.
Sampled actual routing Selected GPT-related traffic matched the intended proxy policy, not DIRECT/REJECT; this does not prove every request or long connection was healthy.
Full desktop quit/reopen on October 27 Main-process start time changed and I confirmed temporary GPT/Work recovery. Failures later recurred. Connections had sometimes recovered even before restart, so a cache/session-state root cause was not established.
HTTP fallback Exists in the bundled-engine records, but did not guarantee recovery; the latest concrete failure was already HTTP.
Short HTTPS/upgrade probes Some succeeded; these do not establish authenticated task or sustained-upload health.
Chrome temporary chat, later on October 28 With proxy settings unchanged, an ordinary native browser interaction completed a short Reply only OK request. This did not validate the full document workflow. Browser and desktop account identifiers/per-request exits were not independently matched, so it is not a strict controlled comparison.
Browser automation during earlier checks A browser tool paused a document response. That run was contaminated and is excluded from network conclusions; the tool-controlled tab was closed before the ordinary browser check.
WebSocket fragmentation experiment Kept the connection alive longer but did not finish the upload; no application patch was installed.

I have not deleted or rewritten conversation history, cleared account data, installed an unofficial patch, or treated the community workarounds below as verified repairs on this machine.

Specific questions for maintainers/community

  1. Is there a known issue or supported fix for HTTP model continuation failing after a local tool returns, with the UI/local projection remaining in progress?
  2. Does the native send/receive implementation permit timely heartbeat processing under sustained upload backpressure? Is bounded fragmentation or an equivalent mitigation supported in an official build?
  3. Is there a supported recovery/export path for affected image-heavy histories that preserves the original conversation and does not repeatedly resend the same oversized context?
  4. What minimum redacted fields distinguish client/proxy transport failure from a received service-side rejection? Can account/IP restrictions be confirmed through an official private support channel rather than inferred from generic errors?
  5. Has anyone recovered a comparable macOS desktop, tool-return, HTTP-send-failure case with an official release or documented setting? Please include version and scope; Windows-only environment-variable or HTTP-only workarounds may not apply.

Potentially related reports, not established duplicates or proof of a shared cause:

This issue was prepared and submitted with the account owner's explicit authorization. It contains a sanitized summary of existing observations, not raw logs or attachments. Private document contents, prompts, screenshots, local paths/usernames, conversation IDs, account contact details, IPs, proxy node/subscription details, cookies, tokens and authentication headers are intentionally excluded. This report does not claim that a private support case or engineering investigation has already been opened.

Activity

  1. added
    bug
    app
    connectivity
    on Oct 28, 2026
  2. github-actions commented on Oct 28, 2026

    @github-actions
    Contributor
  3. zhouchenghao330-svg commented on Oct 29, 2026

    @zhouchenghao330-svg

    Additional CLI 0.165.0 data point, consolidated from #58015 to keep this investigation together.

    On 2026-10-29, macOS 27.0.1 arm64, npm-installed codex-cli 0.165.0, ChatGPT sign-in, gpt-6.1-sol with high reasoning: a conversation that had read many images repeatedly completed WebSocket upgrade and then failed about 81 seconds later with IO error: Broken pipe (os error 32).

    Native-client observations

    Times below are UTC+08:00, correlated to the same affected conversation and turn:

    • Successful WebSocket connections at 15:05:18, 15:06:42, 15:08:04, 15:09:27 and 15:10:52 were each followed about 81 seconds later by a Broken pipe error / retry or HTTP fallback.
    • Retry 1/5 was logged at 15:05:17; HTTP fallback began at 15:12:13: 6m56s from the first retry.
    • The fallback HTTP body measured 18,285,218 bytes before zstd, 12,681,481 bytes after zstd. These are HTTP measurements, not captured failed WebSocket payload sizes.
    • A read-only history audit counted 37 input-image items recorded after the latest compaction, about 16.9 MB of serialized image-item data. This is not a distinct-image count or an exact reconstruction of the active on-wire request.

    HTTP-only and small-heartbeat controls

    A fork inheriting the same history used a custom Responses provider with requires_openai_auth=true and supports_websockets=false. Four approximately 12.7 MB compressed requests received HTTP 200 headers after 80, 84, 105 and 111 seconds from request preparation. These intervals include upload/network/backend waiting and are not full generation times. HTTP-only bypassed the WebSocket retry loop in this sample, but retained large-history latency.

    Clash Verge / Mihomo v1.19.32, rule mode, gVisor TUN and system proxy were active. Sampled live Codex connections matched the intended proxy policy using an AnyTLS outbound. Two lightweight authenticated probes to the Codex Responses WebSocket endpoint, one through the OS/TUN route and one through the explicit local HTTP CONNECT proxy, both completed HTTP 101 and survived 95 seconds with 5 Pong frames received. No model request or conversation content was sent in these probes. They share upstream proxy infrastructure and are not physical no-proxy controls.

    This is consistent with a large-transfer-specific problem rather than universal WebSocket blocking, but does not establish its cause. Our native run did not capture a Close code/reason, so we cannot independently confirm 1011, 1009, a size limit or heartbeat starvation. Proxy/network contribution remains unresolved. The earlier synthetic measurements in this issue belong to that reporter, not to our controls.

    The full sanitized timeline remains in #58015, which is being closed as a duplicate of this issue. No private prompts/images, credentials, account/session identifiers or personal paths are included.

  4. gtoxlili commented on Nov 27, 2026

    @gtoxlili

    Reproduced on Codex CLI 0.172.0 on macOS arm64 with the built-in OpenAI provider. The observations below come from Codex's own logs.

    • One conversation with dozens of typed input_image tool results failed six WebSocket attempts after successful upgrades. Each attempt took about 80 to 90 seconds. The retries logged Broken pipe (os error 32) or websocket closed by server before response.completed. After about nine minutes, Codex fell back to HTTP. The HTTP body was roughly 54 MiB before compression and 40 MiB after. That turn was interrupted while pending. A subsequent HTTP attempt logged error sending request.
    • In a separate conversation with typed image results, two WebSocket upgrades succeeded and both connections closed about 80 seconds later, before response.completed. The turn was interrupted before HTTP fallback. The last successful request used roughly 185,000 input tokens against a 475,000-token context window.

    Each attempt in these two sequences logged non-incremental request reason="connection_closed". That path sends the full input without previous_response_id. The logs did not capture the failed WebSocket message size or the peer's Close code. Logging those would help distinguish a size rejection from a timeout or another transport failure. Codex client source

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

    appbugconnectivity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions