Show context window usage percentage / distance to auto-compact
Resolved 💬 2 comments Opened Apr 4, 2026 by roman-rr Closed Apr 4, 2026
Feature Request
Show the current context window utilization as a percentage or token count, so users can see how close they are to auto-compaction.
Problem
There's no way to know how much of the context window is consumed during a session. The only signals are:
- The "Tip: You have access to Opus 1M" message appearing near the limit
- The
PreCompacthook firing right before compaction happens - The "Compacted" message after it's done
/cost shows cumulative token totals across all turns, but not the current context window size.
Proposed Solution
Any of these would help:
- Status bar indicator — e.g.
ctx: 72%or148k/200kin the bottom bar /contextcommand — show current context size vs limit, similar to/cost- Add to
/costoutput — append a line likeContext window: 148,200 / 200,000 (74%)
Why It Matters
- Long sessions (multi-hour coding) benefit from knowing when compaction is imminent
- Users with
PreCompacthooks can prepare for context loss - Helps decide whether to
/compactmanually vs continue - Useful for understanding token economics when working with large codebases
Environment
- Claude Code CLI
- Model: claude-opus-4-6 (200k standard / 1M extended)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗