[BUG] /context slash command misreporting context usage as mostly free when in fact it is mostly used

Resolved 💬 8 comments Opened Aug 25, 2025 by bshanks Closed Jan 5, 2026

Environment

  • Platform (select one):
  • [x ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.90 (Claude Code)<!-- output of claude --version -->
  • Operating System: Linux pop-os 6.15.10-x64v3-xanmod1 <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 -->
  • Terminal: cosmic-term <!-- e.g. iTerm2, Terminal App -->

Bug Description

<!-- A clear and concise description of the bug -->

The /context slash command is showing me 92.3% free space even though I am getting a "Context left until auto-compact: 6%" message at the bottom right of the screen. See below which is near the end of a long session which has filled most of context (that is to say, /context is wrong when it says 92.3% of context is free):

> /context
  ⎿  ⛁ ⛀ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛀ ⛶
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   Context Usage
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   claude-opus-4-1-20250805 • 15k/200k tokens (8%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System prompt: 3.0k tokens (1.5%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System tools: 11.6k tokens (5.8%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Memory files: 726 tokens (0.4%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛶ Free space: 184.7k (92.3%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶

     Memory files · /memory
     └ Project (/home/sand/org-todotxt/CLAUDE.md): 726 tokens

╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ >                                                                                                                                                                                                                             │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
  ? for shortcuts                                                                                                                                                                           Context left until auto-compact: 6%

Steps to Reproduce

Unknown. I note that earlier in the same session I used the /context slash command and it seemed to work fine (showing almost 50% of context used).

Expected Behavior

I expect /context to report the same 6% free that I see at the bottom right of the screen.

Actual Behavior

/context is reporting almost all context is free when it is not.

View original on GitHub ↗

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