/context command: Free space percentage doesn't account for conversation history, causing confusion

Resolved 💬 2 comments Opened Apr 9, 2026 by JackieTien97 Closed Apr 9, 2026

Problem

The /context command shows inconsistent numbers that are confusing to interpret:

  • Top-level summary says 270.8k/1m tokens (27%) — meaning 27% of context is used.
  • Category breakdown shows Free space: 873.6k (87.4%) — meaning only 12.6% is used.

These two numbers don't add up: 27% used vs 100% - 87.4% = 12.6% used. The missing ~14.4% is conversation history (user messages, assistant responses, tool call results), which is not listed as a category.

Screenshot

The breakdown lists these categories:

System prompt:     35.2k tokens (3.5%)
System tools:      21k tokens   (2.1%)
MCP tools:         16.8k tokens (1.7%)
Custom agents:     9.9k tokens  (1.0%)
Memory files:      8.3k tokens  (0.8%)
Skills:            2.1k tokens  (0.2%)
Autocompact buffer: 33k tokens  (3.3%)
Free space:        873.6k       (87.4%)
                                ------
                                Total ≈ 100%  ← but top says 27% is used!

The category percentages sum to ~100% by themselves, but they only cover static/fixed overhead. The conversation history (~144k tokens, ~14.4%) is silently excluded from the breakdown while still being counted in the top-level usage figure.

Suggestion

Add a Conversation history line to the category breakdown so the numbers are consistent:

System prompt:         35.2k tokens (3.5%)
System tools:          21k tokens   (2.1%)
MCP tools:             16.8k tokens (1.7%)
Custom agents:         9.9k tokens  (1.0%)
Memory files:          8.3k tokens  (0.8%)
Skills:                2.1k tokens  (0.2%)
Conversation history:  ~144k tokens (~14.4%)   ← NEW
Free space:            729.2k       (72.9%)    ← adjusted
Autocompact buffer:    33k tokens   (3.3%)

This way 1 - Free space matches the top-level usage percentage, and users can immediately understand where their context budget is going.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗