Codex session abruptly closed with context window ran out of room error
Open 💬 2 comments Opened May 18, 2026 by mvvbapiraju
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of the Codex App are you using (From “About Codex” dialog)?
26.513.31313 (2867)
What subscription do you have?
Pro
What platform is your computer?
Darwin 25.3.0 arm64 arm
What issue are you seeing?
Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying
What steps can reproduce the bug?
My Codex session was abruptly stopped with 'Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying' error message.
Feedback ID: 019e3293-8d85-7c62-8275-c7d051910d12
What is the expected behavior?
_No response_
Additional information
_No response_
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I think this is the same underlying issue as #7808: the turn hits the context window mid-flight and the session ends instead of auto-compacting and retrying. #7808 has the root-cause analysis and a ready fix branch (additive mid-turn recovery) if it helps triage this one.