Suddenly fails to compact by itself and it shows 0 token usage.

Resolved 💬 3 comments Opened Feb 8, 2026 by xesws Closed Jun 29, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

■ Codex ran out of room in the model's context window. Start a new thread or clear earlier history before 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"
}
}
Token usage: total=0 input=0 output=0

View original on GitHub ↗

3 Comments

xesws · 6 months ago

■ Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying.
Token usage: total=0 input=0 output=0
To continue this session, run codex resume 019c371f-c16b-7f30-9e1f-d3b0418b681a

yassirusa · 4 months ago

When will this be worked on. Codex-5.3 and codex-5.3-spark are completely useless and they keep churning tokens without editing any code until they "run out of room"

etraut-openai contributor · 1 month ago

Thanks for reporting this problem. Until recently, Codex used a separate endpoint and server-side logic for compaction. We recently switched to a more robust approach where the compaction logic is moved locally using the same endpoint as normal turns. This eliminates "remote compaction" errors and increases the stability and reliability of compaction operations. If you see further problems with compaction, please use /feedback and open a new bug report.