[Bug] Status line token count excludes system prompt and tools, differs from /context command

Resolved 💬 3 comments Opened Dec 11, 2025 by iamajvillalobos Closed Dec 15, 2025

Bug Description
Title: Status line shows incorrect token usage compared to /context command

Description:

The status line and /context command show significantly different token usage numbers, which is confusing and misleading about available context.

Steps to Reproduce:

  1. Start a new conversation in Claude Code
  2. Observe the status line token count
  3. Run /context command
  4. Compare the two token counts

Expected Behavior:
Both the status line and /context command should show the same total context usage.

Actual Behavior:

  • Status line shows: Conversation: 1,753 / 200,000 tokens (0.8%)
  • /context shows: 69k/200k tokens (34%)

The status line appears to only count conversation messages (1.7k tokens) while /context correctly shows total context including system prompt, tools, agents, memory files, and autocompact buffer (69k
tokens).

Impact:
Users may think they have 99.2% of context available when they actually only have ~66% available, leading to unexpected context limit issues.

Environment:

  • Claude Code version: 2.0.65
  • Model: claude-sonnet-4-5-20250929
  • Platform: macOS (Darwin 25.1.0)

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.0.65
  • Feedback ID: d6cac2c8-78ef-4f4b-b7c5-b83e30b6e022

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/ajvillalobos/.local/share/claude/versions/2.0.65 (expected in multi-process scenarios)\n    at fjB (/$bunfs/root/claude:2597:1618)\n    at ZAA (/$bunfs/root/claude:2597:1296)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-11T10:21:33.537Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/ajvillalobos/.local/share/claude/versions/2.0.65 (expected in multi-process scenarios)\n    at fjB (/$bunfs/root/claude:2597:1618)\n    at XAA (/$bunfs/root/claude:2595:35624)\n    at async DdD (/$bunfs/root/claude:2595:37725)\n    at async cj (/$bunfs/root/claude:2597:236)\n    at async <anonymous> (/$bunfs/root/claude:2597:13006)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-11T10:21:41.147Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/ajvillalobos/.local/share/claude/versions/2.0.65 (expected in multi-process scenarios)\n    at fjB (/$bunfs/root/claude:2597:1618)\n    at XAA (/$bunfs/root/claude:2595:35624)\n    at async DdD (/$bunfs/root/claude:2595:37725)\n    at async cj (/$bunfs/root/claude:2597:236)\n    at async <anonymous> (/$bunfs/root/claude:2597:13006)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-11T10:21:47.200Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/ajvillalobos/.local/share/claude/versions/2.0.65 (expected in multi-process scenarios)\n    at fjB (/$bunfs/root/claude:2597:1618)\n    at XAA (/$bunfs/root/claude:2595:35624)\n    at async DdD (/$bunfs/root/claude:2595:37725)\n    at async cj (/$bunfs/root/claude:2597:236)\n    at async <anonymous> (/$bunfs/root/claude:2597:13006)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-11T10:23:06.261Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/ajvillalobos/.local/share/claude/versions/2.0.65 (expected in multi-process scenarios)\n    at fjB (/$bunfs/root/claude:2597:1618)\n    at XAA (/$bunfs/root/claude:2595:35624)\n    at async DdD (/$bunfs/root/claude:2595:37725)\n    at async cj (/$bunfs/root/claude:2597:236)\n    at async <anonymous> (/$bunfs/root/claude:2597:13006)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-11T10:23:42.623Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/ajvillalobos/.local/share/claude/versions/2.0.65 (expected in multi-process scenarios)\n    at fjB (/$bunfs/root/claude:2597:1618)\n    at XAA (/$bunfs/root/claude:2595:35624)\n    at async DdD (/$bunfs/root/claude:2595:37725)\n    at async cj (/$bunfs/root/claude:2597:236)\n    at async <anonymous> (/$bunfs/root/claude:2597:13006)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-11T10:24:40.012Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/ajvillalobos/.local/share/claude/versions/2.0.65 (expected in multi-process scenarios)\n    at fjB (/$bunfs/root/claude:2597:1618)\n    at XAA (/$bunfs/root/claude:2595:35624)\n    at async DdD (/$bunfs/root/claude:2595:37725)\n    at async cj (/$bunfs/root/claude:2597:236)\n    at async <anonymous> (/$bunfs/root/claude:2597:13006)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-11T10:24:56.272Z"}]

View original on GitHub ↗

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