Context remaining percentage should account for autocompact buffer
Resolved 💬 1 comment Opened Feb 13, 2026 by hawkymisc Closed Feb 13, 2026
Summary
The "Context Usage" display shows incorrect remaining percentage because it doesn't account for the autocompact buffer.
Current Behavior
When running /context, the display shows:
glm-4.7 · 30k/200k tokens (15%)
This suggests 85% remaining, but the actual details show:
- Free space: 138k (69.2%)
- Autocompact buffer: 33k tokens (16.5%)
Expected Behavior
The remaining percentage should be calculated as:
remaining = (Free space) / Total = 69.2%
Not:
remaining = (Total - Used) / Total = 85%
The autocompact buffer (16.5%) should be subtracted from the displayed remaining percentage since it's reserved for compaction and not available to the user.
Fix
Display: 30k/200k tokens (69%) - accounting for the autocompact buffer.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗