Repository navigation
Measure the status bar's context gauge against the auto-compact point - #11
Merged
Merged
Conversation
Claude Code now auto-compacts near 400k on 1M models, so a gauge against the whole window never reached its 50/80% colors before compaction. The desktop mod uses the threshold Claude Code reports; the terminal script, whose payload carries none, reads CLAUDE_CODE_AUTO_COMPACT_WINDOW, then autoCompactWindow in ~/.claude/settings.json, else assumes the 400k auto default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
evanwon
added a commit
that referenced
this pull request
Dec 3, 2026
…ersion bump (#12) * Bump status-bar to 0.2.0, and refuse a push that changes a mod without a bump claude plugin update compares versions, so the auto-compact gauge from #11 never reached an installed copy: status-bar was still 0.1.0. The pre-push hook now fails when a mod differs from origin/main (tests aside) with the same version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * pre-push: keep Git Bash from rewriting origin/main:<path> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Both context gauges, in the desktop status bar and the terminal status line, now run to the point where Claude Code auto-compacts instead of to the end of the window. The amber and red thresholds (50% and 80%) now mean "halfway to compaction" and "nearly there".
.claude/mods/status-bar): usesautoCompactThresholdfrom$.session.usage({ breakdown: 'summary' }), which the mod already fetched. With auto-compact off, the gauge runs to the end of the window as before. Clicking "ctx" now shows how far along to compaction the context is, for example "auto-compacts at 400,000, 60% of the way there". Added a test for a 1M window that compacts at 400k..claude/statusline-command.sh): the status line input has no auto-compact field (the docs sayused_percentageis always against the full window). The script usesCLAUDE_CODE_AUTO_COMPACT_WINDOW, thenautoCompactWindowin~/.claude/settings.json(the model'smodelSettingsentry, which/autocompactwrites, then the top-level key), and otherwise assumes theautodefault of 400k, capped at the window. The label shows that point, for example60%/400k.Why
Claude Code now auto-compacts near 400k on 1M models. Against the whole window, compaction runs at about 40%, so the gauges never reached amber or red before compacting.
For the reviewer
--autocompactflag, orCLAUDE_AUTOCOMPACT_PCT_OVERRIDE. Withauto, compaction actually runs near 367k, so the terminal gauge reads about 92% at that moment. The desktop gauge uses the exact threshold.bash -n). The script was run with sample inputs for the default, a per-model setting, a top-level setting, the environment variable, a 200k window, no settings file, and the real settings. The desktop band hasn't been seen live: it updates after merge andclaude plugin update status-bar.🤖 Generated with Claude Code