[BUG] Abnormal compute consumption: 5-hour Max Plan quota exhausted in 7 minutes during minor refactor
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
A minor refactoring task performed via Claude Code resulted in a 100% depletion of the "5-hour compute limit" within approximately 7 minutes of real-time usage. This suggests a critical failure in the usage calculation logic or an inefficient file-scanning loop (OOM/Token-burn) when processing project structures.
Context
Plan: Max
Tool: Claude Code (CLI)
Time spent: ~7 minutes
Task: Adding 6 CSS status tokens to types.ts, applyTheme.ts, and 3 theme files, plus replacing hardcoded Tailwind classes in ~15 React components.
Actual Behavior
The system flags the 5-hour limit as completely exhausted, effectively locking the user out of the service.
What Should Happen?
Proportional Consumption: A 7-minute session involving minor text edits and token updates should consume approximately 2-5% of the 5-hour quota, leaving the vast majority of the "compute time" for actual complex development work.
Efficient Scanning: The tool should respect project boundaries (like .gitignore) and only process relevant source files, rather than burning through the entire context window for simple string replacements.
Predictable Limits: As a Max Plan subscriber, I expect the "5-hour limit" to reflect 5 hours of active, high-intensity reasoning, not a few minutes of file indexing.
Accurate Tracking: If a task is about to consume a massive amount of credit (due to a large file scan), the tool should provide a warning or a progress indicator before exhausting the entire daily/weekly quota in one go.
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce
Initialize Claude Code in a React/Tailwind project.
Request a project-wide scan to identify hardcoded color strings
Apply changes to approximately 10–20 files.
Observe the usage quota jumping from <5% to 100% immediately after the operation.
Expected Behavior
A 7-minute session involving minor text replacements should consume a negligible fraction of the 5-hour professional quota.
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.123
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗