\compact does not work
Resolved 💬 7 comments Opened Dec 31, 2025 by jzuiddam Closed Jun 29, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.77.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.2-codex
What platform is your computer?
Darwin 25.1.0 arm64 arm
What issue are you seeing?
This error keeps repeating:
■ 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"
}
}
Also, \compact does nothing.
What steps can reproduce the bug?
Uploaded thread: 019b7080-21b3-7dd3-8210-b6b797c72a16
What is the expected behavior?
_No response_
Additional information
_No response_
7 Comments
I suspect this is related to #8481. We understand the cause of that issue and are working on a fix for the next release.
Many thanks! In case it helps, another uploaded thread ID 019b7f21-8b33-7271-96d4-a9f14700c75d with the same issue.
Curious what is in your
~/.codex/config.toml?Did you set
tool_output_token_limitby any chance?There is not much in there: some
trust_level = "trusted"for some folders and an mcp serverSo no
tool_output_token_limitthere.yep happening with me too "■ 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"
}
}
"
Hey guys, any luck with the fix?
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.