[BUG] Auto-compact threshold silently regressed — fires at ~73% context used, previously ~83%
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I do long agentic sessions where I'm actively building Claude's reasoning context. Compaction destroys that context, so I manage sessions manually — I watch the token percentage and wrap up before compaction fires.
This workflow depends on knowing when compaction will fire. It used to fire consistently at ~83% context used. Today it fired at ~73% with no warning. That's a 10-point shift that invalidated my session boundary habits mid-session.
The problem isn't the number — it's that it changed silently. No changelog, no announcement, no setting I touched. I can't maintain a consistent workflow if this threshold moves without notice.
Expected: threshold stays stable, or breaking changes to session behavior appear in the changelog
Actual: threshold shifted ~10% downward, discovered only when compaction fired earlier than expected
This isn't a request to make it configurable — it's a request to stop changing it without telling people.
What Should Happen?
If the threshold changed intentionally, document it in the changelog
If it changed unintentionally, revert it
Either way, treat session behavior changes as breaking changes that warrant an announcement
Error Messages/Logs
Steps to Reproduce
Start a session
Use context until ~73% consumed
Observe auto-compaction fires — previously did not fire until ~83%
No error message — compaction fires silently, which is the point. The bug is behavioral, not a crash.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
I don't know. I am busy trying to corral Claude.
Claude Code Version
2.1.204 (Claude Code)
Platform
Other
Operating System
Windows
Terminal/Shell
Other
Additional Information
Compaction doesn't end the session — it silently rewrites the context and lets you continue, which makes it more dangerous than a hard stop. You don't always notice it fired. By the time you do, Claude's reasoning context has already been corrupted. That's why I manage session boundaries manually — to avoid compaction entirely.
3 Comments
Thanks for the detailed report. I looked into this on the current release (2.1.233) rather than trying to fill a ~150K-token session, since the trigger point is deterministic once you know the inputs.
What we found: the compaction trigger isn't a fixed percentage. It's the session's auto-compact window minus a fixed safety buffer, and the auto-compact window depends on your model, plan, and configuration — and the default window for a model can be tuned on our side without a Claude Code release. On a 200K window the default works out to about 83% of the context bar, which matches what you were seeing before; a lower default window for your model/plan would move it down to roughly what you're seeing now. The math in the app itself did not change between 2.1.204 and 2.1.233. Docs: https://code.claude.com/docs/en/model-config#default-auto-compact-thresholds and https://code.claude.com/docs/en/context-window
We agree it's confusing to have that boundary move without notice. Two things you can do today: pin the window yourself so it can't move — run
/autocompact <tokens>(for example/autocompact 160k; requires 2.1.221+, so please update from 2.1.204) or setCLAUDE_CODE_AUTO_COMPACT_WINDOW; and run/contextto see the current buffer and free space. See https://code.claude.com/docs/en/model-config#set-the-auto-compact-window.On our side we're considering showing the effective auto-compact threshold directly in
/context/ the status line, and documenting that the default window is server-tuned. If you can share yourclaude doctoroutput, model shown in/status, and whether you set any autocompact env vars or settings, we can confirm which window your sessions are getting.🤖 Generated with Claude Code
I only had it happen that one time, but I was so mad that it happened I
responded. I and claude try to keep a better watch because I never want a
compaction.
On Sun, Aug 16, 2026, 7:29 PM Boris Cherny @.***> wrote:
Auto-compact fired at 73 percent with no warning and the reasoning context was already gone. I ingest the decision before the threshold. Silent earlier compact cannot wipe a written fact.
https://github.com/samvallad33/vestige