[Bug] /context reports pre-truncation skill tokens, not actual context usage

Resolved 💬 0 comments Opened Jun 15, 2026 by alexander-gorowara-zocdoc Closed Jun 26, 2026

Bug Description
Title: /context overstates "Skills" token usage — reports pre-truncation total, not what the model actually sees

Summary

/context reports a "Skills" figure that is the full, pre-truncation sum of all installed skill descriptions, while skillListingBudgetFraction (default 1%) truncates those descriptions before the model sees them. The result: /context can overstate real skill context consumption by ~5× with no indication it's doing so. The two built-in diagnostics disagree, and the discrepancy isn't documented.

Version: 2.1.177

Repro / concrete example

With ~118 installed skills and default settings:

  • /context reports — Skills: 11.3k tokens (5.7%) — and /context all itemizes a per-skill breakdown summing to that 11.3k.
  • /doctor reports — "Skill listing will be truncated. 108 descriptions dropped (full descriptions kept for most-used skills) (5.7%/1% of context)."

So /context's 11.3k = the "5.7% desired" that /doctor explicitly contrasts against the 1% (~2k tokens) actually permitted. The model sees full descriptions for only ~10 skills plus bare names for the other 108 — roughly 2–3k tokens, not 11.3k.

Why this is misleading

  1. /context presents a precise, tokenizer-aware number (per the v2.1.139 changelog refinement) for a quantity that is not what's actually in the context window.
  2. A user inspecting /context to understand or trim their footprint will conclude skills cost 5.7% and may take action (disabling skills, worrying about bloat) based on a figure the budget already mitigates.
  3. The two diagnostics (/context and /doctor) report different numbers for the same thing, and nothing in the docs explains the relationship or which to trust.

Suggested fix (any one would resolve it)

  • Have /context report the post-budget (actual) skill token usage; or
  • Show both — e.g. "Skills: ~2k loaded / 11.3k desired (truncated by skillListingBudgetFraction)"; or
  • At minimum, label the figure as pre-budget and cross-reference /doctor for the enforced amount.

Docs gap: Neither the /context nor /doctor reference documents how the Skills figure is computed or that truncation applies. A note in the skillListingBudgetFraction docs tying the three together would help.

— Drafted by Claude Code (Anthropic CLI) on behalf of alexander.gorowara@zocdoc.com.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.177
  • Feedback ID: 6f3f9b68-3e59-4a97-883d-222944072abf

Errors

[]

View original on GitHub ↗