Skip to content

Generic Bad Request Leaves Image-Heavy Chat Unable to Continue #59621

Open

Description

@eliap-st

What Version of the Codex App Are You Using?

Desktop app 26.1029.61003, build 24614 (installed bundle metadata). The request logs identify Codex client version 0.166.0.

What Subscription Do You Have?

ChatGPT authentication; exact subscription tier not verified.

What Platform Is Your Computer?

macOS 27.0.1, build 26A434; Apple Silicon. uname -mprs: Darwin 27.0.0 arm64 arm.

What Issue Are You Seeing?

An existing local chat stopped continuing after a tool result returned three PNGs. The UI displayed only {"detail":"Bad Request"}. A subsequent one-character message (?) immediately encountered the same error.

The model was gpt-6.1-sol, reasoning effort High. Other requests using the same account and model were accepted around the failure, so this did not affect every chat.

What Steps Can Reproduce the Bug?

This is an observed failure sequence; a deterministic minimal reproduction has not been established.

  1. Continue an existing local chat that is working normally.
  2. Open three local PNGs with view_image, returning their images together in one tool result. In this case, two PNGs measured 1080 × 1620 and one measured 1080 × 1920; the files totalled 16,742,306 bytes.
  3. The next model request repeatedly loses its WebSocket connection. The logs show five retries followed by an HTTP fallback.
  4. POST https://chatgpt.com/backend-api/codex/responses returns HTTP 400 with the 24-byte body {"detail":"Bad Request"}.
  5. Send ? in the same chat. The next request contains substantially the same context and fails with HTTP 400 again.

The tool call that immediately preceded the failure had this structure, with source filenames redacted:

for (const name of ["preview-a.png", "preview-b.png", "preview-c.png"]) {
  image((await tools.view_image({ path: "/local/source/" + name })).image_url);
}

The last successful input usage before these images was 302,791 tokens against a reported 475,000-token context window. This is the last available successful usage record, not a measured token count for the rejected request.

What Is the Expected Behavior?

Codex should process supported image inputs or identify the rejected input and provide a supported recovery path, such as reducing retained image payloads. A short follow-up should not leave the chat repeatedly failing with an unexplained generic error.

Additional Information

Both failures occurred on 5 November 2026. Times below are UTC. Sizes are recorded by the client's zstd request-compression logs.

Time HTTP Status Request ID Uncompressed Bytes Compressed Bytes
09:38:13 400 45d85a9e-13f2-47ac-9f80-da49ed168067 27,920,946 11,967,418
09:38:36 400 062b7bf3-9e79-4fad-b3a4-31dd1a18cc06 27,923,320 11,968,164

Another chat received HTTP 200 for an approximately 23.6 MB uncompressed request. HTTP 200 establishes request acceptance, not completion of its entire streamed turn.

The first failure immediately followed the image-bearing tool result, and the retry resent substantially the same payload. Image payload size or image/context handling is a hypothesis. The response identifies no rejected field or size limit, and these observations do not establish a fixed request-size cutoff.

A separate chat also encountered this generic error during remote compaction on 4 November. It is not established that both incidents have the same cause.

Related reports with similar symptoms: #52320, #52406 and #59185. This report adds the image dimensions, source byte total, logged request sizes and current request IDs for this incident. A common root cause is not confirmed.

No client names, artwork, private conversation content, credentials, raw request bodies or full session logs are included.

Activity

  1. added
    bug
    app
    connectivity
    on Nov 5, 2026
  2. diannegarcia197371-alt commented on Nov 5, 2026

    @diannegarcia197371-alt

    Windows 上多个已有聊天反复报 {"detail":"Bad Request"}。已更新至桌面应用 26.1029.61003,切换模型及重启无效;在原聊天中只要求回复四个字、不调用工具的测试仍然失败。

    请调查已有聊天请求被拒绝的具体原因,并提供保留原聊天记录和素材的恢复办法。症状与本报告类似,尚未确认是否为同一根因。

    本反馈不包含聊天正文、素材、会话编号或完整日志。

  3. statuscompleted-arch commented on Nov 5, 2026

    @statuscompleted-arch

    I am seeing similar image-chat continuation failures on Windows, with an additional observation about model switching.

    A fresh chat can successfully create one batch of images. A subsequent batch request then sometimes fails with {"detail":"Bad Request"}. In an inspected occurrence, the model had just reviewed reference images again and had not yet called image generation for the new batch. Manual /compact also returned Error running remote compact task: {"detail":"Bad Request"}.

    Temporary workaround in my case: switching from Terra to Sol within that same chat lets me continue. The error can return later on Sol, and switching back to Terra helps again. It is not a permanent fix; otherwise I have to keep creating replacement chats.

    The failure is intermittent and can occur after only one completed batch, rather than requiring a very long conversation. I cannot establish whether the cause is image payload handling, model/session handling, or something else. Please investigate this recovery behavior and provide an actionable error or a supported way to resume affected chats.

  4. hjchaa commented on Nov 11, 2026

    @hjchaa

    I'm experiencing a very similar issue in a chat with many rounds of image editing. After the error appeared, even short text-only follow-up messages repeatedly failed with {"detail":"Bad Request"}, preventing me from continuing the existing conversation.

    I submitted feedback through the app on November 11, 2026.

    Feedback ID: 01a1c84f-c2c3-7571-bd79-4450e938b170

    I can't confirm whether the underlying cause is identical to this issue, but the user-visible behavior matches.

  5. vosski064 commented on Nov 14, 2026

    @vosski064

    Same symptom on Codex Desktop for Windows, with a concrete trigger: the chat history came to contain the same image bytes twice (a pasted image was later returned again by a view_image tool result), and the next requests failed with the bare 400. This lines up with the zstd request-compression / decompression-ratio trigger described in #61489.

    Environment

    • Codex Desktop (Windows Store package OpenAI.Codex) 26.1111.2228.0; app-server client 26.1111.21308; codex core 0.169.0-alpha.11.1
    • Windows 10 25H2, x64 (exact build withheld)
    • ChatGPT auth; model gpt-6-astra; reasoning effort ultra
    • Session ID and local paths omitted; request IDs below
    • Request compression active: client log shows Compressed request body with zstd pre_compression_bytes=… post_compression_bytes=…

    Timeline (UTC)

    • 18:44:43 — user message with 7 images (~1.4 MB total) added.
    • 18:45:15 — an exec/view_image tool result added 3 of the same images again; they are byte-identical to 3 of the images above (verified by hashing; image hashes withheld).
    • Then 4 consecutive sampling requests fail:
    time (UTC) HTTP x-oai-request-id uncompressed zstd
    18:45:22 400 0734f213-255a-46f6-a242-486d25175bd1 11,099,830 7,715,653
    18:45:48 400 28051324-4bac-44e4-bc38-5dec880566af 11,100,184 7,715,757
    18:46:14 400 bcd5c81d-8fc2-4b80-9399-e0d9525f6884 11,100,581 7,715,862
    18:47:38 400 a1809341-5499-452c-b32c-6399dc93193c 11,100,944 7,715,934

    All are POST https://chatgpt.com/backend-api/codex/responses → 400 with a 24-byte body {"detail":"Bad Request"}. Short follow-up messages (“continue”, “what is this error”, “you seem stuck”) failed the same way because each turn resends the same history.

    • The chat recovered by itself: 18:52:59 → 200 (11,134,886 / 7,727,180) and 18:53–18:58 all 200.
    • Context was ~171k input tokens against a 258,400-token window; no auto-compaction; not a context-length error.
    • The client had already fallen back from WebSocket to HTTP for this chat; the failures are on the compressed HTTP path only.

    Notes

    I can provide sanitized log excerpts / more request details if useful.

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