claude-code - 💡(How to fix) Fix [BUG] token usage is well above where it should be because claude is working around or ignoring instructions and rules [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#50881Fetched 2026-04-20 12:10:29
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Error Message

Error Messages/Logs

Root Cause

Claude should be following the rules and instructions and guidelines outlined in what is supposed to be its governing doc, and it's failing to do so repeatedly. It apologizes, but that doesn't recover the lost and wasted resources or time. I am now a couple of weeks behind on my project because of this token waste.

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?

We've had numerous sessions to diagnose why so many tokens are being used. We've written rules and guidelines and instructions into Claude.md. Claude is persistently ignoring them or working around them and burning through massive quantities of tokens to do the simplest of tasks. In one instance, it allowed Claude.md to become incredibly bloated, triple the size it needed to be, and then spawned three additional agents and two tool calls to make a single line edit. There were rules written in Claude.md to prevent exactly this situation and yet just opening a new conversation was already showing 8% of the session gone. That's obscene.

What Should Happen?

Claude should be following the rules and instructions and guidelines outlined in what is supposed to be its governing doc, and it's failing to do so repeatedly. It apologizes, but that doesn't recover the lost and wasted resources or time. I am now a couple of weeks behind on my project because of this token waste.

Error Messages/Logs

Steps to Reproduce

You would need to have my old Claude.md and be running tasks. I am not sure that it is something that can be reproduced outside of my project.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

v2.1.114

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

There are so many instances of this issue. You can pull my logs and see where it has happened. I can send you additional records from the backups in the project, but there's too much to just paste, so I will wait to hear from you if you need anything else.

extent analysis

TL;DR

Review and refine the rules and guidelines in Claude.md to ensure they are correctly formatted and prioritized to prevent token waste.

Guidance

  • Verify that the rules and guidelines in Claude.md are up-to-date, correctly formatted, and properly prioritized to ensure Claude follows them as intended.
  • Check for any conflicting rules or instructions that might be causing Claude to bypass or work around the intended guidelines.
  • Consider adding more specific constraints or limits to the rules to prevent excessive token usage, such as limiting the number of agents or tool calls.
  • Review the project's logs and records to identify patterns or common scenarios where token waste occurs, and adjust the rules and guidelines accordingly.

Example

No specific code snippet can be provided without more information on the Claude.md rules and guidelines.

Notes

The issue may be related to the complexity or ambiguity of the rules and guidelines in Claude.md, or the way Claude interprets them. Without more information on the specific rules and guidelines, it's difficult to provide a more detailed solution.

Recommendation

Apply workaround: Refine and update the rules and guidelines in Claude.md to prevent token waste, as it appears to be a configuration or interpretation issue rather than a version-specific bug.

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