Feature request: status line variable for context remaining until compaction
Summary
Add a status line variable that shows how much context remains before compaction triggers, distinct from the existing total context percentage.
Current behavior
The status line can display context as a percentage of total context window used. This tells you how full the window is overall.
Requested behavior
A separate variable (e.g. contextRemainingUntilCompaction or similar) that shows percent remaining before the compaction threshold is hit — i.e., how much headroom is left before Claude Code automatically compresses the conversation.
Why this is useful
The total context % and the compaction threshold are different things. Knowing you're at 60% of total context doesn't tell you whether compaction is about to trigger. A compaction-specific metric would be more actionable for users who want to decide whether to manually shut down and commit state before compaction kicks in automatically.
Use case
During long working sessions (e.g. architecture reviews, multi-file code work), users want to know when to wrap up and save state rather than having compaction happen mid-session unexpectedly.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗