claude-code - 💡(How to fix) Fix Bug: Single trivial message consumes ~17.4k tokens [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45385Fetched 2026-04-09 08:06:39
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×2commented ×1renamed ×1
RAW_BUFFERClick to expand / collapse

Bug: Single trivial message consumes ~17.4k tokens

Model: Opus 4.6 (1M context) — claude-opus-4-6[1m]

The Message

User: today is ... Assistant: Today is April 8, 2026 (Wednesday).

That's it. Two short lines. Yet it consumed ~17.4k tokens.

Before (session start)

Total Usage: 17.8k / 1M tokens (2%)

CategoryTokens% of Context
System prompt6.1k0.6%
System tools6.1k0.6%
Custom agents2470.0%
Memory files3850.0%
Skills3.4k0.3%
Messages1.6k0.2%
Free space961.2k96.1%
Autocompact buffer21k2.1%

After (one message exchanged)

Total Usage: 35k / 1M tokens (3%)

CategoryTokens% of Context
System prompt6.1k0.6%
System tools6.1k0.6%
Custom agents2470.0%
Memory files3850.0%
Skills3.4k0.3%
Messages19k1.9%
Free space943.8k94.4%
Autocompact buffer21k2.1%

Delta

CategoryBeforeAfterChange
Total17.8k (2%)35k (3%)+17.2k
Messages1.6k19k+17.4k
Free space961.2k943.8k-17.4k
All other categoriesNo change

Expected Behavior

A trivial two-line exchange should consume a small number of tokens proportional to the actual content.

Actual Behavior

~17.4k tokens consumed for a message that should be ~20-30 tokens total. This suggests system reminders, MCP tool lists, or /context command output are being injected into the message history and counted against the Messages category.

Loaded Components

  • MCP tools: 150+ tools (Figma, GitHub, Jira/Atlassian, IntelliJ IDEA, Chrome DevTools)
  • Custom agents: 1 (superpowers:code-reviewer — 247 tokens)
  • Memory files: 1 (CLAUDE.md — 385 tokens)
  • Skills: 17 user skills + 17 plugin skills

extent analysis

TL;DR

The issue can be mitigated by investigating and potentially disabling or optimizing the injection of system reminders, MCP tool lists, or /context command output into the message history.

Guidance

  • Review the loaded components, especially the 150+ MCP tools, to identify potential sources of unnecessary token consumption.
  • Investigate the custom agent "superpowers:code-reviewer" and its 247 tokens to determine if it's contributing to the issue.
  • Check the system reminders and /context command output to see if they are being unnecessarily injected into the message history.
  • Consider optimizing or disabling the injection of these elements to reduce token consumption.

Example

No specific code snippet is provided as the issue seems to be related to the configuration and usage of the Opus 4.6 model and its components.

Notes

The actual cause of the issue may be complex and related to the specific configuration of the Opus 4.6 model and its loaded components. Further investigation is needed to identify the root cause.

Recommendation

Apply workaround: Disable or optimize the injection of system reminders, MCP tool lists, or /context command output into the message history to reduce token consumption. This is recommended as it may help mitigate the issue without requiring a full understanding of the root cause.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING