Windows Codex app returns generic 400 after large original image tool output and leaves task unstable

Open 💬 1 comment Opened Aug 9, 2026 by stanrain
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Codex app version

26.803.5235.0

Platform

Microsoft Windows 11 Pro, NT 10.0.26200 x64

Model

gpt-5.6-sol, xhigh reasoning

Summary

In a long-running Codex Desktop task, the agent inspected a 1920×1080 PNG (8,308,808 bytes) through view_image with detail: "original". The tool output serialized the image as an inline data URL of 11,078,434 characters. The next Codex Responses request returned HTTP 400 with only {"detail":"Bad Request"}.

This happened twice immediately after original-detail image results of the same size. A later turn also returned the same 400 after ordinary test output, suggesting that the task/response chain remained unstable after the large inline image entries.

Reproduction

  1. Start a long local Codex Desktop task using gpt-5.6-sol with xhigh reasoning.
  2. Have the agent call view_image with detail: "original" on a 1920×1080 PNG around 8.3 MB.
  3. The tool result inserts an inline data:image/png;base64,... payload around 11.08 million characters.
  4. On the following sampling request, the backend returns HTTP 400 {"detail":"Bad Request"}.
  5. Send “continue” in the same task. The task can work for a while, but repeating original-image inspection triggers the same failure. A later ordinary tool-result continuation may also return 400.

Observed evidence

  • Task/thread ID: 019fe753-7f28-7833-819c-4453d8c6ab7a
  • Failed turn IDs:
  • 019fe79e-5f46-70a2-a563-80211d524486
  • 019fe7ce-0721-78f2-8a2a-118eeb692d81
  • 019fe7d5-62b3-73f1-a7c3-80517a7671f4
  • UTC failure times: 2026-08-09 18:24:55, 18:41:31, and 18:44:35
  • Latest x-oai-request-id: 68b8aa9a-6550-48bf-95e0-ab9ffa53b19a
  • Request: POST https://chatgpt.com/backend-api/codex/responses → 400
  • Response body: {"detail":"Bad Request"} (24 bytes)
  • Input usage before failures: 131,464 / 144,046 / 151,050 tokens against a 258,400-token context window, so this was not a context-window overflow.
  • Restarting Codex between failures did not prevent recurrence.

Expected behavior

  • The client/tool layer should downscale or compress large images, or reject them before inserting an oversized inline data URL into task history.
  • If a payload is too large or invalid, Codex should surface a specific actionable error rather than a generic Bad Request.
  • One bad image entry should not leave later tool continuations in that task unstable.

Workaround

  • Avoid detail: "original" for large screenshots.
  • Inspect the resized/high-detail view, crop to the relevant region, or create a derivative no larger than roughly 1280 px on its longest edge and preferably under 2 MB.
  • If the task keeps returning 400, preserve its work and continue in a fresh text-only task rather than carrying the image-heavy history forward.

Privacy

No screenshot, raw base64 payload, local path, or full session transcript is attached. The task, turn, and request identifiers above should allow correlation with server-side telemetry.

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 18 days ago

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

  • #37719

Powered by Codex Action