[BUG] /context: hiding skills moves tokens from Skills to System tools 1:1, total never drops (re-open of #85439, closed as stale)

Status Open
Reported on v2.1.233
Maintainer reply None cached
Activity 0 comments · opened Sep 14, 2026

Summary

Reopening #85439. It was auto-closed as stale on 2026-09-13 even though it had the reproduced label and a maintainer had already confirmed it as a bug with a planned fix.

The bug: hiding skills (disable-model-invocation: true, disableBundledSkills: true, etc.) makes the Skills row in /context go down, but the System tools row goes up by exactly the same amount. The total never changes.

Root cause (confirmed by a maintainer on #85439, 2.1.233)

The skill listing is not part of the tool definitions; it is sent as a separate note alongside your first message. /context still computes the System tools row as "tools minus the skill listing", so it carves the Skills row out of a number that never contained it. That's why the two rows trade tokens and the total doesn't move. So: hiding skills really does shrink what gets sent to the model — the /context display just doesn't reflect it, and the System tools row is under-reported by the listing size. Confirmed bug in /context reporting on 2.1.233; we'll fix the accounting so the Skills row is additive and the total moves when you trim skills.

So this is a reporting bug in /context, not a payload bug. But /context is the tool users are told to use to check whether trimming skills worked, and right now it always says it did nothing.

Environment

  • Originally reported on: Claude Code 2.1.226, claude-opus-5[1m], macOS 26.6.1 (Darwin 25.6.0), Apple Silicon, native install
  • Confirmed by maintainer on: 2.1.233 (macOS)
  • Current version: 2.1.270. I haven't seen a changelog entry for this fix, and #85439 was closed as stale, not as fixed.

Original measurements

| Row | A: baseline | B: disable-model-invocation on 28 commands | C: B + disableBundledSkills: true |
|---|---|---|---|
| System prompt | 3.4k | 3.4k | 3.4k |
| System tools | 18k | 19.1k | 21.1k |
| Custom agents | 408 | 408 | 408 |
| Memory files | 1.4k | 1.4k | 1.4k |
| Skills | 3.9k (49 skills) | 2.8k (22 skills) | 800 (7 skills) |
| Messages | 8 | 8 | 8 |
| Total | 27.1k | 27.1k | 27.1k |

A: 3.4 + 18.0 + 0.408 + 1.4 + 3.9 + 0.008 = 27.116k
B: 3.4 + 19.1 + 0.408 + 1.4 + 2.8 + 0.008 = 27.116k
C: 3.4 + 21.1 + 0.408 + 1.4 + 0.8 + 0.008 = 27.116k

Steps to reproduce

  1. Start with a setup that has a lot of skills and custom commands. Run /context and write down every row.
  2. Add disable-model-invocation: true to the frontmatter of several commands in ~/.claude/commands/. Restart and run /context again. Skills goes down, System tools goes up by the same amount, and the total stays the same.
  3. Add { "disableBundledSkills": true } to settings.json. Restart and run /context again. You get the same 1:1 trade.

Expected behavior

The Skills row should be counted on top of System tools, not subtracted from it. System tools should show the real size of the tool definitions, and the total should go down when you hide skills.

Related

  • #85439 (original report, confirmed and labeled reproduced, then closed as stale)
  • #14882
  • #38680
  • #30480

View original on GitHub ↗