Error running remote compact task while using 5.3codex-spark
Resolved 💬 5 comments Opened Jun 23, 2026 by martinmclee Closed Jun 29, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
codex-cli 0.142.0 with the codex desktop
What subscription do you have?
Pro 5x
Which model were you using?
5.3codex-spark
What platform is your computer?
Not provided.
What terminal emulator and version are you using (if applicable)?
Not provided.
What issue are you seeing?
While working in Codex, the session hit:
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"
}
}
and then displayed:
Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying.
The same behavior appears to align with context_length_exceeded/remote compaction failures being reported in other open issues.
What steps can reproduce the bug?
- Use model
5.3codex-sparkin a Codex session. - Continue with task until remote compaction is triggered (or manual /compact equivalent is invoked).
- Receive
Error running remote compact taskand the context-window message, preventing normal continuation of the same thread.
What is the expected behavior?
Remote compaction should recover from large context state and complete or offer a safe handoff path without forcing the user to lose context by starting over.
Additional information
- This appears to be another occurrence of the ongoing compaction regression around
context_length_exceeded. - Please let me know if you want me to attach extra diagnostics (thread id/session id, codex version, platform, and full logs).
5 Comments
Research I found while filing this (context-management family):
context_length_exceededon v0.133.0.context_length_exceeded.This is the first report I saw explicitly tied to
5.3codex-sparkwording, so I filed separately to avoid model/variant ambiguity.Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I can reproduce this on Windows with:
26.616.10790.0codex-cli 0.142.0(codex --version)5.3-codex-sparkIt fails during startup work with:
Error running remote compact task... context_length_exceededand then
Codex ran out of room in the model's context window...For the same desktop+CLI on Windows,
5.5appears stable in this same workflow. This points to a 5.3 spark-specific startup/context behavior regression in this thread.Adding a related datapoint from #30194 before closing it as duplicate.
Another observed shape is that compaction may appear to run, but effective context usage does not meaningfully reduce, leaving the next turn still near-full / under context pressure. So the failure mode is broader than the explicit
context_length_exceedederror: compaction needs to reclaim enough usable context to continue, or clearly report that it could not.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
/feedbackand open a new bug report.