You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That suggests this may not just be a generic overflow. If the default auto-compaction threshold is still 90% of raw context, Spark only has 6400 tokens of slack between compact trigger (115200) and effective hard ceiling (121600). In this failure, the last successful response was already at 116010, and the next accumulated step added 11672, so a single search/tool-heavy step seems able to outrun the remaining headroom.
Another bad outcome from the same run: after the compaction failure, Codex wrote an empty final artifact instead of a useful terminal failure result:
Warning: no last agent message; wrote empty content ...
So I think there may be two separate problems here:
Spark's current effective window / compaction timing is too tight for long search-heavy sessions.
When compact_remote overflows, Codex can degrade to an empty final output artifact.
If useful, I can provide a tighter repro packet, but the failing shape here was a broad audit-style run with web search and bounded scratch enabled.
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.
Activity
garitar commentedon Mar 19, 2026
I hit what looks like the same failure on
codex-cli 0.115.0onDarwin 25.2.0 arm64, modelgpt-5.3-codex-sparkwithxhighreasoning.One extra data point that may help narrow root cause: on this machine, the live Codex model cache at
~/.codex/models_cache.jsonsays Spark has:{ "slug": "gpt-5.3-codex-spark", "context_window": 128000, "effective_context_window_percent": 95 }So Codex's effective window becomes
121600, which exactly matches the failing runtime log:That suggests this may not just be a generic overflow. If the default auto-compaction threshold is still
90%of raw context, Spark only has6400tokens of slack between compact trigger (115200) and effective hard ceiling (121600). In this failure, the last successful response was already at116010, and the next accumulated step added11672, so a single search/tool-heavy step seems able to outrun the remaining headroom.Another bad outcome from the same run: after the compaction failure, Codex wrote an empty final artifact instead of a useful terminal failure result:
So I think there may be two separate problems here:
compact_remoteoverflows, Codex can degrade to an empty final output artifact.If useful, I can provide a tighter repro packet, but the failing shape here was a broad audit-style run with web search and bounded scratch enabled.
nos1609 commentedon Apr 11, 2026
Got the same issue on gpt-5.4 with codex-cli 0.120.0
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" }korenmic commentedon May 26, 2026
Getting it in 5.5 in codex desktop too when trying to run /compact
etraut-openai commentedon Jun 29, 2026
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.