Skip to content

v0.9.1

Choose a tag to compare

@Astro-Han Astro-Han released this 25 May 16:18
· 1 commit to main since this release

Track context against CLAUDE_CODE_AUTO_COMPACT_WINDOW.

Since Claude Code 2.1.117 the statusline's context_window.context_window_size is the model's full window (e.g. 1M for Opus 4.7) and used_percentage is measured against it. On a context capped by CLAUDE_CODE_AUTO_COMPACT_WINDOW (e.g. 400K) the bar filled against 1M and looked nearly empty right as auto-compaction was about to fire.

When the env var is set and context_window.total_input_tokens (CC 2.1.132+) is available, the bar now measures used tokens against the auto-compact window and relabels the size (e.g. 15% 400K), matching the desktop app's context indicator. Clamped to the real window, capped at 100%, and falls back to full-window behavior when the env var is unset or token data is missing (early session). Line 1 keeps the model's full-window label (e.g. (1M)) because that reflects the model's capability, not the active budget.

Closes #15