Skip to content

Repeated full-history requests can generate hundreds of GB of redundant client upload per month #45971

Open

Description

@TikiTDO

What happened

A long-running, image-heavy Codex session lost the incremental Responses WebSocket path and began
submitting its full active history over HTTP. Local transport instrumentation measured serialized
request bodies of approximately 22.4–22.6 MiB. Normal model/tool loops could submit that body
multiple times per minute.

Independent UniFi application traffic totals attributed the following traffic to ChatGPT, almost
entirely from the affected workstation:

Window Total traffic Upload Download
24 hours 69.0 GB 65.9 GB 3.12 GB
7 days 309 GB 292 GB 17.2 GB
Rolling 30 days 427 GB 386 GB 40.9 GB

The workstation accounted for 99.8% of the ChatGPT-classified traffic in the 30-day view. One
five-minute bucket contained approximately 878 MB of traffic.

During one clearly correlated 35-minute active interval, the router recorded 1.50 GiB total / 1.41
GiB upload
—roughly the volume of sixty full 22.6 MiB submissions. In the 45 minutes after the
mitigation below was applied, traffic fell to 27.1 MiB total / 14.0 MiB upload, while work in the
session continued.

The attached 24-hour router graph shows the pattern clearly: sustained work, an idle night, a short
return to work using the old request path, and the drop immediately after the mitigation was
applied.

Image

Why this may matter to OpenAI

The connection is unlimited, so this did not create a meaningful bandwidth cost for the user. It
also did not materially concern the ISP. The unusually large recipient-side cost is easy to miss:
OpenAI still receives and handles every repeated full-history body.

I cannot estimate OpenAI's internal bandwidth pricing, and raw cloud ingress may be free or
discounted. But TLS termination, routing, buffering, deserialization, request processing, and
operational capacity are not made free by the user's unlimited connection. If the observed 65.9
GB/day
rate were sustained, it would be approximately 2 TB/month from one workstation.

This is therefore not only a latency or metered-connection problem. It is silent provider-side
resource amplification at fleet scale.

Mitigation that worked

The successful mitigation was:

  1. Compact the active history with caller-authored guidance.
  2. Omit inline image bodies from the installed compacted working history, while leaving the
    source transcript unchanged and recoverable.
  3. Only after that successful size reduction, allow one explicit attempt to establish a fresh
    Responses WebSocket continuation.
  4. If that attempt fails, return to sticky HTTP fallback rather than automatically retrying the
    same oversized full body.

The first full request on the fresh WebSocket was approximately 275 KiB instead of 22.6 MiB—an
approximately 84x reduction. Following turns used incremental request items.

The important properties appear to be:

  • account for retained media in serialized request bytes, not only model tokens;
  • avoid retrying a deterministic oversized full request several times;
  • prevent HTTP fallback from turning every model/tool loop into another full-history upload;
  • allow a successfully reduced context to re-enter the incremental path without restarting the
    thread;
  • keep the original transcript available for inspection and restoration.

Reproduction shape

  1. Use a long-running Codex thread containing multiple screenshots or image-returning tool calls.
  2. Accumulate enough inline media in active or compacted history to make a full serialized request
    tens of megabytes even though token accounting remains below the compaction threshold.
  3. Lose incremental WebSocket reuse and enter HTTP fallback.
  4. Continue through several model/tool loops.
  5. Observe repeated multi-megabyte full-history submissions and rapidly growing client upload.

The exact trigger for losing WebSocket reuse may vary. The expensive behavior is what happens after
the client no longer has a valid incremental continuation.

Expected behavior

  • Normal model/tool continuations should not repeatedly upload the complete accumulated history.
  • Inline media bytes should participate in compaction and request-size thresholds.
  • The client should avoid multiple retries of the same deterministic oversized request.
  • Fallback should remain stable until the context has materially changed or been reduced.
  • Codex should expose serialized request size, inline-media bytes, full-versus-incremental mode,
    transport fallback, and cumulative bytes resent.
  • A configurable request/rolling-session byte guardrail would keep one thread from silently
    generating hundreds of gigabytes of upload.

Environment

  • Linux x86_64.
  • ChatGPT Pro subscription.
  • gpt-5.6-sol.
  • Custom Codex fork based on rust-v0.154.0-alpha.4.
  • The fork added request-size/transport-state observability and the mitigation described above.

The upstream mechanism has independent reports in #45109, #24550, #43015, and #38014. This datapoint
adds the router-scale aggregate, a continued-work before/after comparison, and a mitigation that
restored small incremental requests.

The raw rollout is not attached because it contains prompts, tool output, local paths, and image
payloads. No session IDs, authentication data, or private content are included here.

Activity

  1. added
    bugSomething isn't working
    connectivityIssues involving networking or endpoint connectivity problems (disconnections)
    contextIssues related to context management (including compaction)
    on Sep 16, 2026
  2. github-actions commented on Sep 16, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. keitacai commented on Sep 23, 2026

    @keitacai

    Additional macOS Desktop reproduction on September 23, 2026 (18:00 Asia/Shanghai). I inspected the local session structure and process network counters without publishing prompts, image contents, project paths, thread IDs, or raw logs.

    Environment:

    • macOS 26.7, Apple Silicon.
    • ChatGPT/Codex Desktop 26.915.31945 (build 9922), bundled codex-cli 0.155.0-alpha.9.2.
    • Official ChatGPT authentication; Codex process traffic routed through a local proxy.

    Observed:

    • An image-heavy task's earlier persisted rollout was 54,233,758 bytes. A structural scan found 40 inline image data URLs in custom_tool_call_output, totaling approximately 50.21 MB of Base64 text. The images were viewed/generated during earlier work.
    • After the task resumed and switched to code review only (no new image generation or image viewing in the sampled interval), per-call usage had reached 457,881 input tokens, of which 457,088 were reported as cached. The continuing work consisted of small code/text tool calls.
    • nettop attributed sustained outgoing traffic to the desktop's codex process: roughly 2 MB/s for most of an 18-second sample. A subsequent one-second sample showed 40,506,308 outgoing bytes attributed to that process, including 38,601,425 bytes on its connection to the local proxy (127.0.0.1:7897). The proxy path means these are process-to-proxy bytes, not a direct measurement of WAN payload bytes.
    • The visible local session grew only modestly during the code-review interval. This was not a new 40-MB image-generation output being written at the time of the traffic spike.

    This is consistent with the issue's repeated large-context transport failure mode: retained historical inline images appear to drive large uploads on subsequent model steps even when those steps only inspect code. The high cached-token count does not establish that the client avoided transmitting the context. I did not capture or decrypt the request body, so I cannot prove the exact bytes in the 40-MB burst or identify whether that specific request used HTTP fallback versus WebSocket.

    Please bound serialized media bytes in active history, avoid repeated full-body uploads after transport fallback, and provide a supported way to remove stale inline image bodies from the model's working context while keeping the original transcript inspectable. This also appears related to #41338 and #28316.

  4. keitacai commented on Sep 23, 2026

    @keitacai

    Follow-up with stronger, request-level evidence from the desktop's existing local logs_2.sqlite. No additional image work or controlled continuation was needed, and I am not attaching raw logs because they contain response headers/cookies.

    For the same affected thread, between 2026-09-23 17:40:45 and 18:01:52 Asia/Shanghai, I found 28 codex_http_client::request entries for POST /responses, each explicitly tagged transport="responses_http" and Compressed request body with zstd. Summing the logged sizes:

    • Pre-compression JSON bodies: 1,456,882,100 bytes.
    • Post-compression bodies: 1,076,755,737 bytes (about 1.077 GB decimal) prepared for those 28 POSTs.
    • Per POST after compression: 38,380,464–38,539,187 bytes.
    • The first 27 POSTs have corresponding HTTP 200 response logs in this window. The final POST's result was not present in the selected interval, so the full 1.077-GB sum should be read as encoded body bytes, not a packet-level total of confirmed successful WAN delivery.

    Immediately before this HTTP sequence, codex_core::responses_retry logged WebSocket failures at 17:40:18–17:40:37: Broken pipe (os error 32) and tls handshake eof. The subsequent request records explicitly identify responses_http. The task was later doing text/code-only review, yet those model steps kept preparing approximately 52.2-MB uncompressed / 38.5-MB compressed full request bodies. This strongly ties the repeated upload to HTTP fallback plus retained media history, rather than new image-generation requests.

    The preceding structural scan found 40 inline image data URLs totaling approximately 50.21 MB in custom_tool_call_output history. I did not inspect or publish the request content, so the exact byte composition of each serialized body remains unproven; the measured history size and 52.2-MB body size are, however, closely aligned.

  5. keitacai commented on Sep 23, 2026

    @keitacai

    Sanitized recovery measurement for the same macOS Desktop case:

    • The user ran one manual /compact in the affected thread. The compaction request itself still used responses_http and logged a 38,538,057-byte zstd-compressed body.
    • The resulting installed replacement history contained zero inline image data URLs by structural scan. The original persisted transcript was preserved separately; no raw transcript or media is attached here.
    • One immediately following text-only probe used responses_http with 235,109 bytes before compression / 86,498 bytes after compression. It completed successfully. Compared with the pre-compaction 38.54-MB compressed request, this is approximately a 445x reduction for the next model step.

    This confirms that pruning old image bodies from the working context restores small requests even when the thread remains on HTTP fallback. It is a manual recovery, not a product fix: future image tool outputs can accumulate again, and the client still needs a byte-aware guardrail or durable media-reference strategy. No paths, session IDs, prompts, media, request bodies, headers, or cookies are included in this public comment.

  6. KomorebiLabs commented on Oct 8, 2026

    @KomorebiLabs

    Same,70G/day,i can‘t believe it:Codex currently has at least several design/implementation flaws:

    The image bytes did not actually participate in the context compression and request size threshold determination.

    The HTTP fallback will revert to "full retransmission per round," rather than the stable incremental updates.

    The client will repeatedly attempt to send large, deterministic requests.

    Lack of observability: The request body size, inline media bytes, full/incremental mode, transmission fallback, and cumulative retransmission bytes are not exposed to the user.

    Regarding the OpenAI side, the focus is on scaling resources: while users experience unlimited traffic and don't notice the difference, the server still needs to handle receiving, TLS termination, routing, deserialization, and processing these repetitive, full-sized requests.

    This is not an isolated incident; the issue also references independent reports #45109, #24550, #43015, and #38014.

  7. guoa985-crypto commented on Oct 11, 2026

    @guoa985-crypto

    Additional Windows desktop evidence: compaction cuts a 90.9 MB request to 84.7 KB, but new tool images rapidly rebuild large requests

    Adding sanitized measurements at the affected user's request to this existing bandwidth tracker. This also relates to #43015. These observations are from October 11, 2026; times below are UTC+8. The measurements were collected by Codex through read-only inspection of retained client logs, session structure, and local proxy counters.

    Environment: Windows 11 x64, build 26200; desktop-bundled codex-cli 0.162.0-alpha.17.2; normal ChatGPT/Codex desktop use through a local proxy. No custom client fork or manual changes to session JSONL/SQLite were used. Client logs recorded HTTP fallback in the affected sessions earlier that morning. The initial network failure's cause is not established.

    Natural before/after observations across three image-assisted tasks:

    Anonymized task Last recorded request before manual compaction, after zstd First recorded request after compaction, after zstd Later observation
    A 90,877,930 B at 11:12:03 84,667 B at 11:14:17 Task subsequently archived; no continued-work comparison claimed
    B 5,744,759 B at 11:14:30 98,036 B at 11:17:40 Back to 20,636,162 B at 11:32:28 after additional image work
    C 18,182,680 B at 11:17:48 101,802 B at 11:22:15 Back to 7,333,561 B at 11:32:43 after additional image work

    The three corresponding compacted replacement-history records contained zero inline image data URLs. By the 11:33 structural snapshot, task B had accumulated 18 new image occurrences totaling 27,242,124 Base64 characters, and C had five totaling 9,478,224 characters. Task B's later uncompressed request was 27,903,254 bytes. These are structural observations, not a claim that the exact content of every outgoing body was captured.

    Separately, the local proxy sampler attributed approximately 4.863 GB of upload to codex.exe on proxied connections over 90.48 minutes of observed intervals through 11:36:38, with several tasks active. Sampling gaps, including 11:25–11:35, were excluded rather than counted as zero. This is process-attributed proxy traffic, not a packet-level WAN measurement or the VPN provider's billing total. Likewise, the table measures prepared compressed request bodies, not proof that every byte was successfully delivered or billed as tokens.

    The useful new evidence is rapid recurrence after successful manual compaction on a newer desktop-bundled version. Compaction can recover a small working context, but continued legitimate image inspection quickly makes later requests large again. Archiving tasks and changes in workload mean this is not a controlled overall bandwidth benchmark.

    Could the maintainers confirm the owning tracker and a supported mitigation, and consider:

    1. An aggregate serialized-request/media-byte safeguard independent of token budgeting.
    2. A supported lifecycle for temporary tool images: inspect, retain a textual finding and artifact reference, and reload pixels only when needed, while preserving original files and the inspectable transcript.
    3. Visible request-size/transport diagnostics and bounded retries, plus safe restoration of incremental continuation after successful context reduction when technically possible.

    The practical impact is unexpectedly high upload consumption on a metered connection. Local file deletion or an AGENTS.md instruction cannot remove image bodies already embedded in active history. Users need a product-supported working-context solution. No prompts, image contents, local project paths, account/session IDs, headers, cookies, credentials, or raw logs are included in this comment.

  8. GameDevBaiyi commented on Oct 16, 2026

    @GameDevBaiyi

    Additional Windows desktop measurements, October 16, 2026

    Adding a sanitized follow-up at the affected user's request. These measurements were collected by local diagnostic tasks during multi-session coding/UI work; the reporting assistant did not independently repeat the measurements. The precise desktop app and bundled CLI versions were not captured in this report.

    Ten-minute observation (14:01:38–14:11:38 UTC, 600 seconds):

    • 300 successful sampling observations, with zero sampling errors or counter resets.
    • Total proxy counters increased by 556,117,801 upload bytes and 62,837,598 download bytes.
    • Summing only attribution intervals consistent with the global counters gives a conservative observed lower bound of 538,877,625 upload bytes attributed to codex.exe connections to chatgpt.com.
    • One attribution interval failed the global-counter consistency check and was excluded from that lower bound. These are proxy-counter measurements, not decrypted request-body measurements, packet-level WAN delivery totals, or billing records.

    Separate short idle comparison:

    Two equal 50-second windows each covered approximately 48 seconds of observed traffic. Repeated outer agent/tool wait cycles recorded 4,370,553 upload bytes, versus 312,955 bytes with a single local wait, a 92.84% reduction in that short comparison. Five idle workers were also stopped during the broader mitigation work; this was not a controlled benchmark of normal multi-session development. The short idle result should not be treated as a promised reduction during coding or UI work.

    The fresh evidence is that substantial upload remains observable during Windows desktop use, and avoidable continuation cycles can materially increase traffic even during a short idle period. This report does not establish that the affected October 16 traffic used WebSocket-to-HTTP fallback or replayed historical image bodies. Those remain hypotheses consistent with this tracker, requiring request-level confirmation. The Windows symptom also appears relevant to #29854.

    Please prioritize investigating repeated large-context/media replay and fallback behavior, and expose serialized request bytes, retained media bytes, full/incremental request mode, and transport mode in supported diagnostics. A byte-aware guardrail and a supported recovery within the existing conversation would be valuable; users should not have to abandon or move ongoing sessions to keep upload bounded. Unexpected upload at this scale can carry meaningful cost on metered connections.

    No project names, private repository links, prompts, images, local paths, session IDs, raw logs, or credentials are included.

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

    bugSomething isn't workingconnectivityIssues involving networking or endpoint connectivity problems (disconnections)contextIssues related to context management (including compaction)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions