claude-code - 💡(How to fix) Fix [BUG] Using tens of thousands of tokens for trivial work [2 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#52413Fetched 2026-04-24 06:07:50
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Author
Timeline (top)
labeled ×5commented ×2cross-referenced ×1

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

In two different instances yesterday and today CC (Sonnet 4.6 default) used tens of thousands of tokens to do trivial work. It used ~30K tokens to answer the wrong question and ignore what I asked, and then used ~14K to write a <100 line CSV file for data it already had.

What Should Happen?

CC should pay attention to the request, which might prevent it from diving into lots of unrelated things. For creating a CSV file, it should do it faster than a human.

Error Messages/Logs

Steps to Reproduce

Not sure how to reproduce it without burning the few remaining tokens I have.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.118 (Claude Code)

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Xterm

Additional Information

No response

extent analysis

TL;DR

The issue may be resolved by optimizing the input prompts to help the Claude Code model focus on the requested task and avoid unnecessary token usage.

Guidance

  • Review the input prompts used in the instances where the issue occurred to identify potential ambiguities or open-ended questions that might be causing the model to generate excessive output.
  • Consider adding specific constraints or guidelines to the prompts to help the model stay focused on the task at hand.
  • If possible, try to reproduce the issue with a minimal example to better understand the cause and potential solutions.
  • Explore the Anthropic API documentation to see if there are any parameters or settings that can be adjusted to optimize the model's performance and token usage.

Notes

The lack of specific error messages or logs makes it challenging to provide a more targeted solution. Additionally, without more information on the previous version that worked, it's difficult to determine if this is a regression bug or a new issue.

Recommendation

Apply workaround: Optimize input prompts to help the model focus on the requested task, as this may help mitigate the issue without requiring a code change or version upgrade.

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