Skip to content

Retained images exceed Responses WebSocket size limit: five retries before HTTP fallback; 16 MiB ± 1 byte reproduction #55730

Open

Description

@yannan-cr

What version of the Codex App are you using?

Desktop bundle: 26.1013.40934, build 20770 (read from the installed app's Info.plist).
Installed bundled CLI reports 0.163.0-alpha.10.2. The already-running process was not restarted or binary-matched during diagnosis, so this does not establish its exact build.

What subscription do you have?

ChatGPT Pro, using ChatGPT sign-in.

What platform is your computer?

macOS 26.6.2, Apple Silicon (arm64).

What issue are you seeing?

An existing image-heavy conversation repeatedly displayed:

Reconnecting 5/5
stream disconnected before completion: websocket closed by server before response.completed

Each WebSocket handshake succeeded, but the client retried the full request five times before falling back to HTTP. HTTP then succeeded and the conversation resumed.

This is related to #55317 and #38846. This report adds an independent, minimal JSON-whitespace boundary control at 16 MiB ± 1 byte, and focuses on byte-aware preflight/fallback and loss of Close-code diagnostics. It does not reproduce or claim the heartbeat timeout discussed in #55317.

Original incident evidence

On 2026-10-21 (UTC+08:00):

  • 10:07:29: WebSocket connected successfully.
  • 10:07:43–10:08:02: retries 1/5 through 5/5, each with the error above.
  • Reconnection logs contain non-incremental request reason="connection_closed".
  • 10:08:08: falling back to HTTP.
  • The subsequent HTTP request log records pre_compression_bytes=19094865 post_compression_bytes=11130448 using zstd.
  • 10:08:15: HTTP 200; assistant output and tool execution subsequently resumed.

The HTTP body's uncompressed size is 19,094,865 bytes (18.21 MiB). This is a measured HTTP fallback body, not a captured byte-for-byte copy of the failed WebSocket message.

A read-only reconstruction using the last compacted.replacement_history plus subsequent response_item records, up to the turn's start, found:

  • 152 history items.
  • 9 retained inline user images: 18,189,822 data-URL bytes (17.35 MiB).
  • Serialized reconstructed history: 18,972,342 bytes, before additional runtime instructions/tool schemas and any runtime filtering.
  • The most recent recorded compaction had retained historical images; the images alone exceeded the boundary measured below.

The historical failure's Close code was not preserved. Therefore, attributing that original incident to size rejection is a strongly supported inference, not a claim that its actual Close frame was captured as 1009.

What steps can reproduce the bug?

Controlled transport test (completed)

Using a separate Python standard-library WebSocket probe, connect to the same authenticated Responses endpoint, wss://chatgpt.com/backend-api/codex/responses, through the existing local HTTP CONNECT proxy.

Serialize this synthetic warmup event as compact UTF-8 JSON:

{"type":"response.create","model":"gpt-6-astra","instructions":"Diagnostic warmup.","input":[],"tools":[],"store":false,"generate":false}

For each target size, append ASCII spaces after the closing JSON brace, so the message remains valid JSON with identical semantic content:

payload = json.dumps(event, separators=(",", ":")).encode("utf-8")
payload += b" " * (target_bytes - len(payload))
assert len(payload) == target_bytes

Use a fresh WebSocket connection per case. Send one logical Text message in 64 KiB continuation fragments, with FIN only on the last fragment. Mask client frames and respond to server Ping frames. Do not negotiate permessage-deflate. Read the raw server Close frame as well as response events.

Exact logical message bytes Upgrade Result Total elapsed
1,024 HTTP 101 response.completed 3.32 s
16,777,215 (16 MiB − 1) HTTP 101 response.completed 6.68 s
16,777,217 (16 MiB + 1) HTTP 101 Received Close 1009, empty reason; no response events 7.11 s

All three cases used the same endpoint, account, model, proxy and selected upstream node. Only the trailing whitespace byte count changed. No original images, prompts or conversation history were transmitted by the probes. generate=false produced no model output.

This brackets a size-sensitive rejection within two bytes around 16 MiB on this route. It does not establish the exact inclusive configured limit, which backend/edge component enforces it, or limits for other endpoints. Fragmentation does not bypass the logical-message limit.

Network context

Clash uses mixed port 7897. The desktop and backend processes inherited HTTP/HTTPS proxy variables plus a SOCKS5 ALL_PROXY value. Matching local socket ports against the Clash connection table confirmed active backend connections to chatgpt.com using HTTP CONNECT. The synthetic probes explicitly used that same HTTP CONNECT proxy without changing network configuration.

Below-boundary success and above-boundary Close 1009 on the same route give a more specific explanation than a general proxy outage. They do not prove that every reconnect error has this cause.

What is the expected behavior?

  • Consider a serialized-byte budget separately from token/context limits, including retained inline image data.
  • When the request is known to exceed the supported WebSocket budget, select a supported transport or recovery path before repeatedly uploading it.
  • Preserve Close code/reason and classify a received 1009 as non-transient for an unchanged payload; avoid retrying the same oversized request five times.
  • Provide an actionable error and a supported way to recover an affected conversation without losing useful context.

HTTP fallback already recovered this incident. The issue is the avoidable retry loop and misleading generic network diagnosis.

Additional information

The public source's Message::Close(_) branch returns a generic error without including the code/reason:

The probe uses the documented warmup behavior:
https://developers.openai.com/api/docs/guides/websocket-mode

No original screenshots, private prompts, raw rollouts, account/thread/turn identifiers, credentials, personal filesystem paths or proxy server addresses are included in this report. Original history and application/network settings were not modified.

Activity

  1. added
    bug
    app
    connectivity
    on Oct 21, 2026
  2. chenzecan97-boop commented on Oct 23, 2026

    @chenzecan97-boop

    Adding independent Windows evidence for this issue, submitted by an assistant at the user's explicit request.

    Environment: Windows desktop; bundled core codex-cli 0.163.0-alpha.11.1 during the 2026-10-23 probes; model gpt-6-astra. The preceding native incident on 2026-10-22 used 0.163.0-alpha.11.

    Native observation: an image-heavy conversation repeatedly completed WebSocket handshakes, then logged five retries with Windows error 10053 before HTTP fallback. The first fallback request had pre_compression_bytes=40682846 and post_compression_bytes=28556602; subsequent model requests remained large. These are encoded HTTP body sizes, not a capture of the failed WebSocket payloads or an exact retransmission/billing total.

    Independent transport controls: authenticated, certificate-verified TLS to wss://chatgpt.com/backend-api/codex/responses; current TUN route versus explicit HTTP CONNECT through the same existing proxy exit. No application or proxy settings changed.

    • Small warmup requests completed and Ping/Pong worked on both routes.
    • For a single uncompressed text frame declaring 16,777,217 bytes, the peer returned Close 1009 on both routes after only 64 payload bytes were sent. A declaration of 16,777,216 bytes was not immediately rejected within 3 seconds, after which the tester closed it. This is a frame-header boundary control, not evidence that a complete 16 MiB request succeeded.
    • A frame declaring 40,682,846 bytes returned 1009 on both routes after only a 16 KiB payload prefix was sent.
    • A complete 6,916,440-byte synthetic-image warmup request completed on TUN. A follow-up using previous_response_id completed with a 227-byte request and no image retransmission. This demonstrates a useful reuse path in the isolated test, not a measured fix in the desktop client.
    • The same synthetic-image request on explicit CONNECT exceeded the probe's 10-second receive timeout and was closed by the tester; this does not establish a route-specific disconnect. One separate attempt failed during TLS setup.

    The native logs did not preserve a 1009 Close frame or actual failed frame lengths. Therefore, linking every native 10053 to this size rejection remains an inference; other failures may coexist.

    Please investigate serialized-byte preflight, preservation/classification of Close 1009, and avoiding unchanged oversized retries while retaining incremental image-context reuse and task quality. Automatic text/token compaction alone should not be assumed to enforce a wire-byte budget.

    No project content, images, raw logs, transcripts, local paths, account/session identifiers, credentials, or proxy addresses are included. No attachments.

  3. yyyzl commented on Oct 27, 2026

    @yyyzl

    Adding another macOS Desktop observation, posted by an assistant at the user's explicit request. Is there a supported workaround or a fix planned for continuing an existing affected thread without losing its useful context?

    Environment: Codex Desktop 26.1021.31345; installed bundled CLI reports 0.164.0-alpha.11.1; macOS Apple Silicon; model gpt-6.1-terra, reasoning effort xhigh. The running binary was not independently matched against the public source build.

    Observed sequence, in one existing thread:

    • Before an approximately 32-minute idle gap, the same thread already contained six user-attached PNGs and had approximately 329k input tokens. WebSocket requests were being reused; many successive model steps were about 3–7 seconds apart, including any intervening work.
    • On the next turn, WebSocket handshakes succeeded, but the client logged non-incremental request reason="connection_closed" and then five retries with websocket closed by server before response.completed. It subsequently logged falling back to HTTP.
    • The first recorded HTTP fallback request had pre_compression_bytes=25295743 and post_compression_bytes=12332390. Several HTTP requests then took approximately 27–31 seconds from request preparation to response headers. The first assistant update appeared about 149 seconds after the turn started, including retries.
    • The next turn in the same thread and process did not repeat the reconnect loop, but remained on HTTP: two requests took about 17–18 seconds from request preparation to response headers, with compressed request bodies of approximately 12.3 MB. This was better than waiting through retries, but still slower than the earlier reused-WebSocket steps. Some later requests had high prompt-cache reuse, so prompt-cache hits alone did not eliminate the delay.

    These are local observations, not a controlled benchmark: tasks differed, and the time to response headers includes request transmission and upstream waiting. HTTP request-body sizes are not a captured WebSocket payload or a measurement of transferred/billed bytes. The local history contains approximately 23.7 MB of inline image data URLs, but we did not capture the peer's close code or run a synthetic size-boundary test; request size is a plausible factor, not a proven cause. This single example does not establish an idle timeout threshold.

    Could maintainers clarify:

    1. Is there a supported way to recover this same thread while keeping its history and full-resolution images, and to verify whether compaction actually reduces the serialized request size?
    2. Is there a supported way for a session to retry WebSocket after HTTP fallback once the cause has cleared, without an unbounded retry loop?
    3. Are there plans for aggregate image/request-byte budgeting and actionable close-code diagnostics, separate from token-based context limits?

    No private text, images, raw logs, local paths, thread IDs, account details, credentials, or proxy addresses are included.

  4. chipfighter commented on Oct 29, 2026

    @chipfighter

    @yannan-cr Your case where nine old images survive compaction and the conversation goes through five reconnects before continuing is close to the problem that led me to build Context Attachment Manager.

    I'm the author. I originally needed it while repeatedly revising character images for a short film. It's free and open source, now v0.9.1 with 560 GitHub Stars, with people facing similar image-history problems using it and sharing feedback.

    After installing and restarting Codex, automatic selection is enabled by default. The assistant can retrieve original pictures as needed, including after compaction, rather than carrying every old picture into each turn. The panel lets you browse thumbnails, search by remembered visual details, zoom previews, and choose references to keep selected.

    Original quality and conversation records are preserved. Management stays on your machine; the plugin doesn't separately collect or upload your images or chats.

    https://github.com/chipfighter/context-attachment-manager
    The page includes setup steps. Once you're comfortable with the plugin, you can ask Codex or Claude Code to install it for you. It supports Codex Desktop and the local Code tab in Claude Desktop.

    If image-heavy conversations are still part of your workflow, I'd welcome your feedback on whether it helps avoid that repeated image build-up.

  5. zzz163519 commented on Oct 31, 2026

    @zzz163519

    Additional Windows/WSL CLI evidence, posted at the affected user's explicit request. This concerns generated-image histories as well as attached images. Related reports: #52464 and #55083.

    Environment

    • Windows host, Ubuntu WSL2, local Codex CLI, ChatGPT sign-in.
    • Model in the affected sessions: gpt-6.1-sol, reasoning effort xhigh.
    • On October 30, the installed CLI reported 0.165.0; the already-running process was not independently version-queried. On October 31, both the affected session metadata and the installed CLI reported 0.166.0.
    • An HTTP CONNECT proxy is in the network path.

    A. Large HTTP requests after repeated image generation, October 30

    The persistent history contained 19 image-generation records whose result fields totaled 50,865,220 ASCII Base64 characters. These history measurements are separate from the request measurements below; I did not capture the final model-input body.

    Two attempts at the same short text follow-up logged these zstd request-body sizes:

    Attempt Before compression, bytes After compression, bytes
    First 51,985,682 37,480,035
    Resubmitted 51,986,678 37,480,335

    The first request received HTTP 200 headers approximately 6 minutes 30 seconds after request preparation. The turn was interrupted after 6 minutes 56 seconds without an assistant reply or tool execution. Resubmitting prepared another request of almost the same size. Time to headers includes upload, intermediaries and upstream waiting; it is not an isolated upload-time measurement.

    B. Repeated WebSocket disconnects in a newer generated-image session, October 31

    A separate session contained five image-generation records with 12,474,356 ASCII Base64 characters in their result fields, plus image-view operations. This is not a measurement of its serialized WebSocket request size.

    The recorded sequence included:

    • Successful HTTP 101 WebSocket handshakes, followed by disconnects approximately 80-82 seconds later on several consecutive attempts.
    • websocket closed by server before response.completed.
    • IO error: Broken pipe (os error 32) and IO error: Connection reset by peer (os error 104) on subsequent attempts.
    • An explicit user retry started another turn and encountered the same pattern.
    • codex doctor --network-only --json passed provider HTTP reachability and the Responses WebSocket handshake check. This only establishes short-probe connectivity, not reliable transfer of the affected history.

    Linux TCP snapshots also showed unsent data and sustained receiver-window backpressure on the connection to the local proxy. The proxy separately recorded connection timeouts in the same incident period. Network involvement has therefore not been ruled out.

    Current-source observations

    At public main 67f0994b532b8740f14b5b738af7b7b2a915b1d6:

    • The image-generation output constructs an inline PNG data URL for model follow-up: tool.rs.
    • An existing history test explicitly preserves image-generation results for image-capable models: history_tests.rs.
    • The normal response stream still discards the received Close frame's details and returns the generic disconnected error: responses_websocket.rs.
    • The shared retry path switches to HTTP after the stream retry budget is exhausted: responses_retry.rs.

    These are source observations, not proof that every generated image is retransmitted on every incremental request or a binary-matched root-cause reproduction.

    Limits and requested recovery

    I did not capture a Close 1009, the failed WebSocket frame length, or an alternate-network/image-removal control. The October 30 HTTP sizes must not be treated as captured WebSocket sizes, and the October 31 incident is not proof of the exact 16 MiB rejection described above.

    This adds evidence that generated-image workflows can leave even a short follow-up carrying a very large request, while generic reconnect errors obscure whether recovery is possible. A supported fix should preserve original images and useful visual context, enforce a serialized-byte budget separately from token estimates, preserve Close diagnostics, and avoid unchanged retries for an explicitly identified size rejection. HTTP fallback alone also does not address repeated large uploads.

    Is there a supported recovery path for existing CLI sessions, or a planned fix for reference reuse/byte-aware transport selection? Only aggregate measurements and sanitized error strings are included here; no original images, conversation contents, identifiers, credentials or proxy addresses are attached.

  6. chen21019 commented on Nov 1, 2026

    @chen21019

    Additional Windows observation: successful WebSocket upgrades, five early-close retries, then HTTP recovery

    I observed the same retry/fallback pattern on Windows on 2026-11-01. This adds a Windows case to this issue rather than a separate duplicate report.

    Environment

    • Windows 11 x64, OS build 26200.
    • Desktop-reported client version: 26.1027.30824; installed MSIX package version: 26.1027.3384.0.
    • Bundled core checked directly with --version: codex-cli 0.166.0-alpha.5.1.
    • Model: gpt-6.1-sol, reasoning effort ultra, ChatGPT sign-in, default OpenAI provider.
    • An existing conversation containing prior images and tool calls was resumed after restarting the app.

    Observed sequence (UTC+08:00; corresponding UTC times are eight hours earlier)

    Local time Observation
    13:16:16 Retry 1/5: stream disconnected before completion: websocket closed by server before response.completed
    13:16:21 Retry 2/5 with the same error
    13:16:26 Retry 3/5 with the same error
    13:16:30 Retry 4/5 with the same error
    13:16:34 Retry 5/5 with the same error
    13:16:41 codex_core::client: falling back to HTTP; HTTP request compression logged
    13:16:50 Assistant text output resumed
    13:16:52 An agent communication tool call completed
    13:17:10 A command execution tool call completed

    Interleaved connection records show repeated successful Responses WebSocket upgrades (status=101) and non-incremental request reason="connection_closed" before fallback. The initial connection failure was not an inability to perform the WebSocket upgrade.

    The HTTP fallback request logged:

    pre_compression_bytes=22221547
    post_compression_bytes=10045087
    

    These are the measured HTTP fallback body sizes, not a captured byte-for-byte copy of the failed WebSocket message. The last recorded model input around this incident was approximately 190,394 tokens against a reported 475,000-token context window.

    Interpretation and limits

    • This Windows observation is consistent with the size-sensitive failure described in the original report, but I did not run a synthetic boundary test or capture the actual WebSocket Close code. It therefore does not independently prove a 16 MiB limit or establish which component closed the connection.
    • HTTP fallback demonstrably restored assistant output and tool progress in the affected conversation. This is stronger than a successful HTTP handshake or a separate short-prompt test.
    • No controlled alternative-network test was performed, so network-path involvement is not fully excluded.
    • The problem presented to the user as an apparently stalled task while the unchanged failure pattern was retried five times.

    Please consider byte-aware transport selection, preservation of Close code/reason, and avoiding repeated unchanged requests when the close indicates a non-transient failure. A supported recovery path should preserve the existing conversation and completed work.

    Only sanitized event descriptions, timings, versions and aggregate sizes are included here. No conversation text, images, raw transcripts, raw headers, credentials, account/session identifiers, personal filesystem paths or workplace infrastructure details are attached.

  7. MianMian5012 commented on Nov 2, 2026

    @MianMian5012

    Independent reproduction on macOS Apple Silicon with codex-cli 0.166.0:

    • A request with one synthetic PNG of about 7.1 MB completed over WebSocket.
    • A request with two copies of that PNG produced about 19 MB of model input and reproduced websocket closed by server before response.completed. After five retries, HTTPS fallback completed.
    • Four smaller JPEG images completed successfully.

    The original image-heavy conversation also recovered after HTTPS fallback; its logged HTTP request body was approximately 26 MB before compression.

    These controls show a payload-size-sensitive failure on this network path. They do not capture the WebSocket close code or establish which component enforces the limit.

    Please consider byte-aware transport selection and preserving close-code diagnostics, while retaining the original images and conversation context.

  8. HezeAI commented on Nov 4, 2026

    @HezeAI
  9. Aurantium-47 commented on Nov 13, 2026

    @Aurantium-47

    Windows Desktop follow-up: recurrent stalls in image-heavy chats, 2026-11-13

    Adding measurements from another affected Windows installation. The problem recurred across image-editing and photo-layout conversations: a short text follow-up could spend several minutes reconnecting with no useful progress, while a fresh, non-forked chat supplied with a concise task description and local image paths could start responding and running tools. Several replacement jobs completed. Some original chats also eventually resumed after HTTP fallback, so this is intermittent, not a claim that every affected chat is permanently unrecoverable.

    Environment

    • Windows 11 x64, OS build 26200.
    • Current installed Desktop MSIX: 26.1106.6628.0; Desktop client version in recent app-server events: 26.1106.51428.
    • Current Desktop-bundled executable queried with --version: codex-cli 0.167.0-alpha.4.1. This does not establish the core version of earlier processes.
    • Earlier same-day incidents also occurred with Desktop client 26.1103.60933.
    • Affected models included gpt-6-astra and gpt-6.1-sol, using ChatGPT sign-in.
    • A local TUN proxy is in the network path. A controlled direct-path/alternate-network comparison was not performed.

    Native log evidence

    All times below are 2026-11-13, UTC+08:00. Read-only queries were made against the local logs_2.sqlite; only selected event fields are included.

    One photo-layout conversation logged this sequence after a short text follow-up:

    Time Observation
    21:10:21 Retry 1/5, Windows IO error 10053
    21:11:43 Retry 2/5, same error
    21:13:05 Retry 3/5, same error
    21:14:29 Retry 4/5, same error
    21:15:52 Retry 5/5, same error

    The logged error was:

    stream disconnected before completion: IO error:
    你的主机中的软件中止了一个已建立的连接。 (os error 10053)
    

    The Windows message means that an established connection was aborted by software on the host. Earlier in that conversation, the logs recorded falling back to HTTP at 20:45:24. Another image-editing conversation recorded the same fallback at 19:46:47.

    HTTP request compression records show substantial retained request sizes:

    Conversation / time Before zstd, bytes After zstd, bytes
    Image-editing A, 12:21:16 138,971,661 100,468,792
    Image-editing B, 19:46:49 153,281,405 112,296,182
    Image-editing B, 20:00:50 171,296,544 125,553,325
    Photo-layout C, 20:45:24 19,851,393 14,557,117
    Photo-layout C, 21:04:13 25,895,442 19,079,126

    These are measured HTTP request-body sizes, not captured failed WebSocket frame sizes, total retransmitted traffic, or billable usage. The table does not establish that every request failed: the original conversations sometimes made further progress.

    Workflow and impact

    1. Continue a Desktop conversation containing repeated image generation/editing or image-preview operations.
    2. Send an ordinary short follow-up asking for another variation or layout.
    3. Observe repeated stream-disconnect retries and long periods without an assistant reply/tool progress.
    4. Manually reconstruct the current requirements and reference-image mapping in a separate, clean chat to continue working.

    This workaround repeatedly required rebuilding task context and checking that detailed user constraints were not lost. It is a recovery burden, not a durable fix.

    Limits and requested investigation

    The observations are consistent with the retained-image/request-size problem tracked here, but no WebSocket Close 1009 or failed-frame length was captured in these incidents, and no new boundary test was run. Error 10053 alone does not prove size rejection. Proxy/network involvement is not excluded. Fresh-chat recovery is an observed workaround, not a controlled root-cause experiment.

    Please investigate byte-aware transport selection and history/image-reference reuse, preservation of Close-code diagnostics, and avoiding repeated unchanged requests when a failure is known to be non-transient. The UI should expose the retry/fallback stage and offer a supported way to recover the existing task with its requirements and original image quality intact.

    Submitted by an assistant at the affected user's explicit request. This comment contains no original images, private prompts, raw transcripts/databases/headers, credentials, thread/turn IDs, personal filesystem paths or proxy addresses.

  10. goldisfreedom commented on Nov 19, 2026

    @goldisfreedom

    Images finish, then ChatGPT Work stalls on both Windows and Linux

    I use ChatGPT Work on Pro 100. I generated a high volume of images in one day without this problem. The next day, images still appeared normally, but Work repeatedly got stuck on “Thinking” or “Reconnecting” before finishing the conversation.

    I initially suspected a recent ChatGPT app update on my Windows 11 machine, so I tried my older laptop running CachyOS Linux and an older version of ChatGPT Work. In a fresh project, I asked for just three images. All three appeared, then Work got stuck reconnecting. The turn eventually finished after about 25 minutes in total. I could reproduce the visible stall without Windows or the newer ChatGPT client. I collected the detailed transport logs on Windows only, so I can’t confirm that Linux followed the same WebSocket retry sequence.

    On Windows I also tested whether clearing earlier images from the working context would help. /compact removed both earlier images from the saved context, and the next three-image batch still stalled. Earlier question about compaction

    Windows run. Desktop 26.1111.9664.0, bundled runtime 0.169.1. I generated two images in a fresh project, then requested three more in the same chat. All three new PNGs were on disk before the first disconnect. Here are the selected log events, shortened, with elapsed time rounded to seconds from the last PNG save.

    +00:00  Last PNG saved. Image tool returned all three images.
    +01:13  retry 1/5: websocket closed by server before response.completed
    +01:15  WebSocket upgrade: HTTP 101
            non-incremental request reason="connection_closed"
    +03:05  retry 2/5: OS error 10053
    +04:59  retry 3/5: OS error 10053
    +06:51  retry 4/5: OS error 10053
    +08:44  retry 5/5: OS error 10053
    +10:39  falling back to HTTP
    +10:40  pre_compression_bytes=14124415 post_compression_bytes=10136923
    +12:38  POST /backend-api/codex/responses: HTTP 200
    +15:14  Final answer recorded.

    Each successful WebSocket upgrade was followed by about 110–111 seconds before the next abort or fallback. The scheduled retry waits were only 0.195–3.283 seconds. After HTTP recovered, the pending file-copy step ran once and finished in 1.44 seconds. The fallback body measured 13.47 MiB before compression. I don’t have the failed WebSocket message length or protocol close code, so I can’t attribute this incident to the 16 MiB boundary measured here.

    Controlled compaction run. In a separate Work chat, I kept the style prompt and generation settings the same across both batches.

    Stage | Local measurement -- | -- Generate two images | Two inline image data URLs totaled 6,015,044 encoded bytes. Run /compact | Completed in 5.5 s. The saved replacement history was 131,267 serialized bytes and contained zero embedded image URLs. Generate three more | All three PNGs were saved. The new tool result added 8,218,834 encoded image bytes. Continue the chat | One 10053 and two further WebSocket closes. I stopped the turn 5 min 2 s after the last PNG save. No HTTP fallback had been logged by then.

    This verifies what disappeared from the saved working context. The logs did not measure how many image bytes went over the WebSocket after compaction.

    Images finish, then ChatGPT Work stalls on both Windows and Linux I use ChatGPT Work on Pro 100. I generated a high volume of images in one day without this problem. The next day, images still appeared normally, but Work repeatedly got stuck on “Thinking” or “Reconnecting” before finishing the conversation.

    I initially suspected a recent ChatGPT app update on my Windows 11 machine, so I tried my older laptop running CachyOS Linux and an older version of ChatGPT Work. In a fresh project, I asked for just three images. All three appeared, then Work got stuck reconnecting. The turn eventually finished after about 25 minutes in total. I could reproduce the visible stall without Windows or the newer ChatGPT client. I collected the detailed transport logs on Windows only, so I can’t confirm that Linux followed the same WebSocket retry sequence.

    On Windows I also tested whether clearing earlier images from the working context would help. /compact removed both earlier images from the saved context, and the next three-image batch still stalled. Earlier question about compaction

    Windows run. Desktop 26.1111.9664.0, bundled runtime 0.169.1. I generated two images in a fresh project, then requested three more in the same chat. All three new PNGs were on disk before the first disconnect. Here are the selected log events, shortened, with elapsed time rounded to seconds from the last PNG save.
    +00:00 Last PNG saved. Image tool returned all three images.
    +01:13 retry 1/5: websocket closed by server before response.completed
    +01:15 WebSocket upgrade: HTTP 101
    non-incremental request reason="connection_closed"
    +03:05 retry 2/5: OS error 10053
    +04:59 retry 3/5: OS error 10053
    +06:51 retry 4/5: OS error 10053
    +08:44 retry 5/5: OS error 10053
    +10:39 falling back to HTTP
    +10:40 pre_compression_bytes=14124415 post_compression_bytes=10136923
    +12:38 POST /backend-api/codex/responses: HTTP 200
    +15:14 Final answer recorded.
    Each successful WebSocket upgrade was followed by about 110–111 seconds before the next abort or fallback. The scheduled retry waits were only 0.195–3.283 seconds. After HTTP recovered, the pending file-copy step ran once and finished in 1.44 seconds. The fallback body measured 13.47 MiB before compression. I don’t have the failed WebSocket message length or protocol close code, so I can’t attribute this incident to the 16 MiB boundary measured here.

    Controlled compaction run. In a separate Work chat, I kept the style prompt and generation settings the same across both batches.
    Stage Local measurement
    Generate two images Two inline image data URLs totaled 6,015,044 encoded bytes.
    Run /compact Completed in 5.5 s. The saved replacement history was 131,267 serialized bytes and contained zero embedded image URLs.
    Generate three more All three PNGs were saved. The new tool result added 8,218,834 encoded image bytes.
    Continue the chat One 10053 and two further WebSocket closes. I stopped the turn 5 min 2 s after the last PNG save. No HTTP fallback had been logged by then.

    This verifies what disappeared from the saved working context. The logs did not measure how many image bytes went over the WebSocket after compaction.

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