Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying
What version of Codex CLI is running?
v0.124.0
What subscription do you have?
Pro 20x
Which model were you using?
gpt-5.5 xhigh
What platform is your computer?
Darwin 25.4.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
VSCode
What issue are you seeing?
After a few hours of working, i start getting this which is the 1st time ever, i'm not sure if there is a bug or this is a new feature, because whatever it is this is really so bad, and even with 258K context window, we're working on a huge project and this new bug/feature is completely destroying everything!
Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying
this never happen before with gpt-5.4 xhigh at all, i even have a very long session with gpt-5.4 i used over 5b tokens in the same session without any issues, but with gpt-5.5 xhigh i even didn't reach 20m/t and start getting this
■ Codex ran out of room in the model's context window. Start a new thread or clear earlier history before
Also
retrying.■ Error running remote compact task: { "error": { "message": "Your input exceeds the context window of this model. Please adjust your input and try again.", "type": "invalid_request_error", "param": "input", "code": "context_length_exceeded" } }
What steps can reproduce the bug?
Just working for a few hours and reached about 20m/t of usage and start getting this!
What is the expected behavior?
it should be fixed just like how we was using it with gpt-5.4 xhigh, not sure if this is a model limits or feature or a Codex CLI bug!
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗