"Bad request" error
Open 💬 22 comments Opened Feb 4, 2026 by atomical
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
0.94.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.2 xhigh
What platform is your computer?
Darwin 25.1.0 arm64 arm
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.
What is the expected behavior?
_No response_
Additional information
_No response_
22 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
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: https://github.com/openai/codex/issues/10343#issuecomment-3877198157
Update. Here is a good example:
<img width="854" height="685" alt="Image" src="https://github.com/user-attachments/assets/c09f33f3-9fc4-4699-94e3-506319cead15" />
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.
@ryanc-cf, please use
/feedbackto upload your logs and session details and post your thread ID here. That will allow us to investigate.<img width="3790" height="1615" alt="Image" src="https://github.com/user-attachments/assets/529396b9-45a1-4e4b-867a-cd7fe749ed40" />
@etraut-openai See here, 3x in a row :/ https://github.com/openai/codex/issues/12477
@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
If you see this, please use the
/feedbackslash command to upload your logs and session details, then post the thread ID here.here's one @etraut-openai 019c81c3-1821-73c3-9523-5a976caf5200
@etraut-openai I think BBARLOCCO is right, I tried making a new session and it didnt work for me. But I do recall it compacting the session lots of times and then eventually these errors started showing up. The fix for me was to actually delete ~/.codex completely and start over. For some reason starting a new session wouldnt fix it for me. But I do suspect it's multiple compactions that are the problem child. It got to a point where compacting would result in about 37% free when it should have been closer to 90-98% I think. So it's summary was super long. Perhaps the fix is to put a limit on how long the summary can be?
Thanks @ryanc-cf. I think we have the details we need to identify the specific failures in our back-end logs. We're exploring a couple of working theories and trying to root cause.
Haven't tried clearing the folder yet, but I'm having the same issue. Also have a very long summary that's taking up around 75% of the context window.
My session is not particularly long and neither are the prompts
019c8bf9-8ec0-7b12-9ded-e32ecaab5668
@kalleh, the rollout you uploaded is very long. It's over 100MB and contains well over 10,000 items.
@etraut-openai I was invited to test the new Codex for Windows app. After installing it, I started to receive {"detail":"Bad Request"} errors on each session, generally within 10 minutes into execution. The errors have been occurring in both the new Codex for Windows app and the Codex VS Code extension. I thought it might be a conflict between the two, so I uninstalled both as well as VS Code. I deleted every file I could find related to Codex or VS Code from my pc. I reinstalled VS Code and the Codex extension. The error has not gone away.
019ca095-6396-7082-8d4b-aa83afcf1be6
--
UPDATE: In order to get moving again, I switched to WSL. It appears to have eliminated the issues. On the Codex Extension in VS Code, I clicked the gear icon in the upper right corner, then "Windows Settings" > "Run in WSL". This is not a direct "fix" per-se but seems to have gotten Codex working again for me.
thread ID 019cb071-37bc-79c0-81e4-7020e72bbf0d
codex cli on ubuntu
019d2080-1aee-7db2-a066-ec3e4fb4cf94 on every request codex gui on MacOs
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
getting
{"detail":"Bad Request"}error in codex since today, breakig the /goal flow. gpt 5.5 highGetting this again now in the latest Codex! Come on!!!!
I'm getting {"detail":"Bad Request"} every time I'm trying to make codex to work with e2e screenshot testing - looks like it chokes