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 is running?
v0.80.0
What subscription do you have?
i just at the begining of the chat, with one question.
Which model were you using?
other
What platform is your computer?
win-x64
What issue are you seeing?
What steps can reproduce the bug?
Uploaded thread: 019bab9f-b98b-7113-9fa8-f439369b7233
现在的lua新增路由的时候,是会处理upstream下面所有的路由吗?譬如```--- 1. 更新路由: xx/v1/sync/ ---
路由结果: {'target': 'http://xx:8000', 'host': 'xx', 'status': 'ok'}``` 访问xx/v1/sync/
business 是不是相当于访问http://xx:8000/business
What is the expected behavior?
No response
Additional information
💡 Tip: If someone reports the same issue, please use the /feedback slash command to upload your logs. 📝
Please use the /feedback slash command to upload your logs and session details for this session, then post the thread ID here.
Edit: Apologies, I just noticed that you included a thread ID. I missed it because of the formatting.
Please use the
/feedbackslash command to upload your logs and session details for this session, then post the thread ID here.Edit: Apologies, I just noticed that you included a thread ID. I missed it because of the formatting.
yes, please ,see this -> Uploaded thread: 019bab9f-b98b-7113-9fa8-f439369b7233 @etraut-openai Ok, that is fine. i have the same feeling too. the format is control by your template.
even with the latest release ((v0.98.0), I am getting the same error repeatedly and quite often
■ Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying.
even with the latest release ((v0.98.0), I am getting the same error repeatedly and quite often
■ Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying.
I just downgraded and pinned my version to v0.80.0 (haha). It has fewer latest skills but works with other models. When I start a new conversation, I don't get the 'Codex ran out of room' warning. @sriinnu
Also had some issues around this. In my case, it seems to be the remote compaction feature. They use /responses/compact, which keeps around every user message ever sent for the whole duration of the entire session history. Only assistant messages, reasoning and some tool calls are really removed.
Maybe, I misunderstand the code, but this seems like an issue for longer threads honestly.
I’m seeing the same behavior.
When I run multiple web tool calls (search_query / open / find) in one turn, the context meter in the UI barely moves, and then the turn fails with context_length_exceeded.
From a user perspective, it looks like web-tool context is not reflected in live token usage.
Could this be improved by:
- Including web-tool context in the live context meter (or showing a separate hidden/tool-context counter),
- Updating the meter after each tool call (not only at turn completion),
- Adding a client fallback: on
context_length_exceeded, auto-compact and retry once.
This would make token behavior much clearer and prevent surprising failures.
yes, i r right @JiepengLab , i have the same feeling (in point 3, maybe is out of context), but i haven't review the codex code, so that i am not sure.
so, maybe the warning can make more clearly @etraut-openai
how can earlier history be cleared
still seeing this in latest version 0.104.0
@yyyyaaa, if you have that thread available still, please use /feedback to upload its contents and post the thread ID here.
@etraut-openai here's one I just had the problem: 019c9db2-f55d-7e70-bc46-3873bb460bad
I noticed that it's always in the middle of tool calling and getting responses from tool calls
@etraut-openai 019cc95e-222b-7fa3-b3a0-64c2757aa46c the context ran out but I only used one message, it just started happening today
@etraut-openai 019ccb39-9fe9-7de1-ab21-f5aef3e49b28
@etraut-openai 019cd190-df10-7d53-b3a3-068d8beb24e8 on CodeX App for mac
@etraut-openai 019cde40-84b5-7971-8718-5b1ad678248f on CodeX App for Mac M4 Pro
@etraut-openai 019cf9f7-b03c-7913-bcd8-1543b3157f2d
Codex 5.3 Spark is effectively unusable for me, since this tends to happen after a turn or two. This happened when I tried Spark for the first time at least a week ago; today I decided to try it again but ran into this issue again.
I am also facing the same issue here, I am using GPT-5.4 on Azure AI Foundry
`019d078e-b23b-76a3-bce7-abae58560b7d`
same issue 019da230-dc53-7f10-8e23-b95079c8a8c1
even with the latest release ((v0.98.0), I am getting the same error repeatedly and quite often ■ Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying.
I just downgraded and pinned my version to v0.80.0 (haha). It has fewer latest skills but works with other models. When I start a new conversation, I don't get the 'Codex ran out of room' warning. @sriinnu
I tried without any skills, but still face the issue.
This is a usage stopping issue that propped up since yesterday. I rolled back to 0.120 its teh same. think its related to remote compaction. @etraut-openai A blocker for getting any actual work done with codex as the harness seems to stop every 5-10 minutes recently.
Or mention your thread ID 019db9e0-74c2-7cf3-8e5c-5de5246f7311 in an existing issue.