claude-code - 💡(How to fix) Fix [Bug] Excessive token consumption per prompt with Opus 4.7 1M context model [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#52153Fetched 2026-04-23 07:35:14
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1
RAW_BUFFERClick to expand / collapse

Bug Description Title: Excessive token usage per prompt — weekly limit exhausted unusually fast
Description:
Over the past several days, token consumption per single prompt in Claude Code has been abnormally high.
Observed:

  • Weekly usage (all models) hit 100% far earlier than my usual pace
  • 78% of last-24h usage was at >150k context, even for short follow-ups in fresh sessions
  • Single prompts that previously cost a few % of the weekly budget now consume significantly more Environment: - Claude Code CLI, Opus 4.7 (1M context)
  • Plan: Max + extra usage
  • OS: WSL2 (Ubuntu) on Windows 11
  • No recent changes to CLAUDE.md, hooks, MCP servers, or auto-memory
    Questions: 1. Any recent change to context handling / auto-compact thresholds?
  1. Known issue where long sessions fail to compact and re-send full history every turn?
  2. Any change in how cached input tokens count against the weekly limit?
    Note: Content was truncated.

extent analysis

TL;DR

Investigate recent changes in context handling, auto-compact thresholds, or cached input token counting to address excessive token usage per prompt.

Guidance

  • Review the Claude Code documentation for any updates on context handling or auto-compact thresholds that may be causing the increased token usage.
  • Check the Claude Code CLI version (currently Opus 4.7) for any known issues related to token consumption or context management.
  • Verify that the CLAUDE.md file and hooks have not been modified unintentionally, as this could affect token usage.
  • Consider reaching out to the Claude Code support team to inquire about any changes in how cached input tokens count against the weekly limit.

Notes

The issue description suggests that the problem is related to changes in token usage patterns, but the root cause is unclear. Further investigation is needed to determine the exact cause of the issue.

Recommendation

Apply workaround: Monitor and adjust token usage patterns, and consider optimizing context handling and auto-compact thresholds to reduce token consumption. This is recommended because the issue is likely related to changes in token usage patterns, and adjusting these settings may help mitigate the problem.

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