You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What terminal emulator and version are you using (if applicable)?
Terminal.app
What issue are you seeing?
{"detail":"Bad Request"}
This continues to happen after 30+ minutes when I send a prompt. I have 39% context left. It's unrecoverable and generates the same error if I send "continue."
thread ID: 019c2394-2e58-7eb0-98e7-978424cb4745
What steps can reproduce the bug?
Seems specific to a larger project that requires a lot of reasoning to move forward. I haven't seen it in other sessions.
I understand the wish to not duplicate issues but I am having this issue and #10343 is closed. So here is my feedback on it. Current situation is hardly useable for longer tasks: #10343 (comment)
Getting {"detail":"Bad Request"} on almost every single request/reply. What the hell is causing this? Codex is almost unusable because this error shows up so often.
Reacted by Tobi, Dang Hoang, nathantrantham and Rahul Sawhney
@etraut-openai I've been seeing this error over and over, from the Codex app. I believe that it's related to having a big context several times "compressed", at some point, something breaks and it faces the bad request error very fast (even if not directly, like after a few messages.
If I start a new chat session, I don't see the problem for a long time
getting this error on gpt 5.4 and 5.5 on multiple agent chats
Thread id example: 019db8a5-9754-7c62-b0ab-9cf80011d1bf
Plan: pro x2
Mac OS, using the desktop codex app.
Seems like the agent thread gets corrupted, tried forking the thread to see if that helped but had the same error on every message or almost every message. It felt like usually after calling a bash read or some tool/mcp. But not sure sometimes it happened just responding.
Copying the thread id and continuing with the same model and config in a separate chat worked with no issues
this is happening to me too while working with multiple images (generatin/reading), the websocket keeps reconnecting, then fallsback to HTTPS, and then it errors with that bad request
UPDATE: 0.144.1 version was failing constantly, 0.145.0 now fails sometimes
Still reproducible on the latest Codex CLI 0.147.0.
Environment / repro details:
Codex CLI: 0.147.0 (upgraded from 0.146.0; upgrade did not fix it)
macOS, Apple Silicon
Model: gpt-5.6-sol
Long-running software-engineering session with many tool/command executions
Context was about 126K / 258K when the issue occurred, so the context window was not exhausted
/compact was run, but the problem persisted
Exiting and resuming the same session also did not fix it
The session has used /goal
The failure can recur repeatedly as: ■ {"detail":"Bad Request"}
I uploaded the affected session with /feedback as requested.
Thread ID: 019f804e-6921-7ca2-8299-24c3ba432134
This is particularly disruptive because abandoning the session is not a practical workaround for long-running coding tasks with substantial accumulated context. Please investigate the uploaded thread/session state; it may also help determine whether the trigger is related to long transcripts/tool outputs, resume state, /goal, or request serialization.
Update: I was able to recover the same affected thread without starting a new conversation, and the result strongly points to accumulated inline images in the rollout history as the trigger.
Affected thread (already uploaded via /feedback): 019f804e-6921-7ca2-8299-24c3ba432134
Environment:
Codex CLI 0.147.0
macOS / Apple Silicon
gpt-5.6-sol
long-running software-engineering thread
What I observed:
The problem started after a period of frequent image/screenshot use.
The rollout JSONL had grown to ~985 MB.
/compact, upgrading 0.146.0 -> 0.147.0, restarting, and resuming the same thread did not fix the repeated ■ {"detail":"Bad Request"} failures.
I inspected and repaired the local rollout while preserving the same thread ID and text/tool history:
After this image-only cleanup, I resumed the same thread and the repeated {"detail":"Bad Request"} problem stopped. No /new or replacement thread was required.
This is only a workaround, not a fix. It suggests that large numbers of inline base64 images can accumulate in replayable thread state and eventually make subsequent Responses requests fail with a generic 400. Codex should ideally externalize/cap/sanitize image payloads before they become durable replay history, and provide a repair path for already affected threads.
This appears closely related to #18629 (inline base64 tool images poisoning replayable thread state).
Getting this in ChatGPT Work on macOS as well. The entire Work run fails with {"detail":"Bad Request"} after running for a while, then the job stops and is marked as completed. This ruins unattended/overnight jobs because there is no retry or recovery.
Additional measured occurrence on Windows with OpenAI's ChatGPT-backed Codex Responses endpoint. This is recoverable by a later user turn in the same task, but interrupts unattended development.
Failed request size: 4,901,395 bytes before compression /409,512 after. The preceding successful request was 4,894,198 /405,968 bytes.
Five preceding requests at 00:48–00:52 UTC returned 200. Later same-task requests at 00:56:38, 00:56:49 and 00:57:10 also returned 200 after a new user turn.
No actual root-thread compaction/truncation failure was found in retained logs.
The event followed a completed read-only CI-status tool operation; GitHub's build continued independently. No external write was being rejected. The logs provide no validation reason, so these measurements do not establish a payload ceiling, image cause or exhausted context. Related image/payload reports such as #41338 may describe another path to the same generic error.
Please correlate the request ID with the server-side rejection reason and expose an actionable error/recovery path. No request body, image, credentials, raw logs, project content or local filesystem path is included here. No permanent client-side repair is claimed.
I’m seeing what appears to be the same failure in Codex Desktop on macOS (Intel).
The affected task was a long-running, tool-heavy workflow with many browser/computer-use calls. A contextCompaction event occurred during the task, and the task initially continued successfully afterward. Later, every follow-up began returning:
Activity
github-actions commentedon Feb 4, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
pardeike commentedon Feb 10, 2026
I understand the wish to not duplicate issues but I am having this issue and #10343 is closed. So here is my feedback on it. Current situation is hardly useable for longer tasks: #10343 (comment)
pardeike commentedon Feb 10, 2026
Update. Here is a good example:
[-]Bug: Bad request error for a prompt that requires a lot of reasoning / long round[/-][+]"Bad request" error[/+]ryanc-cf commentedon Feb 21, 2026
Getting {"detail":"Bad Request"} on almost every single request/reply. What the hell is causing this? Codex is almost unusable because this error shows up so often.
etraut-openai commentedon Feb 21, 2026
@ryanc-cf, please use
/feedbackto upload your logs and session details and post your thread ID here. That will allow us to investigate.ryanc-cf commentedon Feb 21, 2026
ryanc-cf commentedon Feb 21, 2026
@etraut-openai See here, 3x in a row :/ #12477
BBARLOCCO commentedon Feb 22, 2026
@etraut-openai I've been seeing this error over and over, from the Codex app. I believe that it's related to having a big context several times "compressed", at some point, something breaks and it faces the bad request error very fast (even if not directly, like after a few messages.
If I start a new chat session, I don't see the problem for a long time
etraut-openai commentedon Feb 22, 2026
If you see this, please use the
/feedbackslash command to upload your logs and session details, then post the thread ID here.BBARLOCCO commentedon Feb 22, 2026
here's one @etraut-openai 019c81c3-1821-73c3-9523-5a976caf5200
11 remaining items
ReidGarland commentedon Mar 3, 2026
thread ID 019cb071-37bc-79c0-81e4-7020e72bbf0d
codex cli on ubuntu
stefanwiele commentedon Mar 26, 2026
019d2080-1aee-7db2-a066-ec3e4fb4cf94 on every request codex gui on MacOs
juansalvatore commentedon Apr 23, 2026
getting this error on gpt 5.4 and 5.5 on multiple agent chats
Thread id example: 019db8a5-9754-7c62-b0ab-9cf80011d1bf
Plan: pro x2
Mac OS, using the desktop codex app.
Seems like the agent thread gets corrupted, tried forking the thread to see if that helped but had the same error on every message or almost every message. It felt like usually after calling a bash read or some tool/mcp. But not sure sometimes it happened just responding.
Copying the thread id and continuing with the same model and config in a separate chat worked with no issues
JustFly1984 commentedon Jun 14, 2026
getting
{"detail":"Bad Request"}error in codex since today, breakig the /goal flow. gpt 5.5 highNellInc commentedon Jul 14, 2026
Getting this again now in the latest Codex! Come on!!!!
JustFly1984 commentedon Jul 14, 2026
I'm getting {"detail":"Bad Request"} every time I'm trying to make codex to work with e2e screenshot testing - looks like it chokes
madacol commentedon Jul 28, 2026
this is happening to me too while working with multiple images (generatin/reading), the websocket keeps reconnecting, then fallsback to HTTPS, and then it errors with that bad request
UPDATE: 0.144.1 version was failing constantly, 0.145.0 now fails sometimes
JeremySun1224 commentedon Aug 15, 2026
Still reproducible on the latest Codex CLI 0.147.0.
Environment / repro details:
/compactwas run, but the problem persisted/goal■ {"detail":"Bad Request"}I uploaded the affected session with
/feedbackas requested.Thread ID:
019f804e-6921-7ca2-8299-24c3ba432134This is particularly disruptive because abandoning the session is not a practical workaround for long-running coding tasks with substantial accumulated context. Please investigate the uploaded thread/session state; it may also help determine whether the trigger is related to long transcripts/tool outputs, resume state,
/goal, or request serialization.JeremySun1224 commentedon Aug 15, 2026
Update: I was able to recover the same affected thread without starting a new conversation, and the result strongly points to accumulated inline images in the rollout history as the trigger.
Affected thread (already uploaded via
/feedback):019f804e-6921-7ca2-8299-24c3ba432134Environment:
What I observed:
/compact, upgrading 0.146.0 -> 0.147.0, restarting, and resuming the same thread did not fix the repeated■ {"detail":"Bad Request"}failures.I inspected and repaired the local rollout while preserving the same thread ID and text/tool history:
input_imageentriescodex/toolSurface.screenshot.urlinline screenshots (~5.71 MiB)input_imagecount = 0data:image/count = 0After this image-only cleanup, I resumed the same thread and the repeated
{"detail":"Bad Request"}problem stopped. No/newor replacement thread was required.This is only a workaround, not a fix. It suggests that large numbers of inline base64 images can accumulate in replayable thread state and eventually make subsequent Responses requests fail with a generic 400. Codex should ideally externalize/cap/sanitize image payloads before they become durable replay history, and provide a repair path for already affected threads.
This appears closely related to #18629 (inline base64 tool images poisoning replayable thread state).
yair-zenity commentedon Aug 31, 2026
Still getting this error on GPT-5.6 Sol. Any update on this issue?
HonkCY commentedon Sep 7, 2026
Getting this in ChatGPT Work on macOS as well. The entire Work run fails with {"detail":"Bad Request"} after running for a while, then the job stops and is marked as completed. This ruins unattended/overnight jobs because there is no retry or recovery.
dominicrf commentedon Sep 7, 2026
Additional measured occurrence on Windows with OpenAI's ChatGPT-backed Codex Responses endpoint. This is recoverable by a later user turn in the same task, but interrupts unattended development.
{"detail":"Bad Request"}.7856edd4-faf4-4696-9a62-f8c8e3913eca.a371bd13eb0ba4d3-MIA.full_context_window_limit_reached=false.The event followed a completed read-only CI-status tool operation; GitHub's build continued independently. No external write was being rejected. The logs provide no validation reason, so these measurements do not establish a payload ceiling, image cause or exhausted context. Related image/payload reports such as #41338 may describe another path to the same generic error.
Please correlate the request ID with the server-side rejection reason and expose an actionable error/recovery path. No request body, image, credentials, raw logs, project content or local filesystem path is included here. No permanent client-side repair is claimed.
manuelpgs commentedon Sep 18, 2026
I’m seeing what appears to be the same failure in Codex Desktop on macOS (Intel).
The affected task was a long-running, tool-heavy workflow with many browser/computer-use calls. A
contextCompactionevent occurred during the task, and the task initially continued successfully afterward. Later, every follow-up began returning:{"detail":"Bad Request"}yepher commentedon Sep 20, 2026
I am seeing the same thing since lastnigh in codex and this morning.