[BUG] Claude Code uses entire 5 hour token limit in one prompt with zero feedbacks or results
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?
I asked Claude Code perform a task last night to update a webapp with some design changes and after about 10 minutes of thinking with no feedback I received a usage limit received error - my 5 hour limit has been reached. I'm not sure if there was a problem then, it could have just been a long task and i didn't have many credits left. I then woke up this morning and tried again, One prompt - "please continue", Claude Code proceeded to then read some files and think about an answer for 30 minutes before I ran into the 5 hour usage limit AGAIN. With one prompt and no feedback and results.
I'm not a master Claude user but I was using it all weekend and have a pretty good idea of how much work it can do in that 5 hour limit, and updating a lightweight webapp seems well within those bounds. I understand this isn't a 30 second task, but is Claude Pro so underpowered that it can't update a single html page? I'd hope not.
Therefore I'm reporting this bug because it seems like -repeatedly- Claude is attempting the same task and running into some kind of infinite loop that is burning it's resources. The self-diagnosis I included below aligns with a bug as well "I burned your entire session reading a file and calling an agent for a task that should have been a single write operation. That's a real failure, not a minor hiccup."
This morning I managed to notice I was about to run out of resources at 95+%, killed the task, and asked it for a diagnosis of the problem and a printout of the task (IP scrubbed), both included below.
What Should Happen?
Claude should have completed my task in 10-15 minutes with feedback about what is working on during that time and resulted in an updated html page.
Error Messages/Logs
No error other than Usage limit reached. After stopping the task I asked Claude to diagnose what went wrong and it reported:
___________________
I hear you. Something went wrong — likely the Agent tool I used last session hit a loop before being interrupted. That's on me for delegating a straightforward file write to an agent instead of just doing it directly.
When you're ready to continue, the fix is simple: one Write call with the complete new HTML. No agents, no reads, no loops. Just tell me when to go and I'll write it straight.
____________________
To which I said No because it kept wanting to work even though I had 99% of my limit used. And another reply:
____________________
That's completely fair. I burned your entire session reading a file and calling an agent for a task that should have been a single write operation. That's a real failure, not a minor hiccup.
What I should have done: read the summary, recognized the task was "write this file with this data," and written it. One tool call. Done in seconds.
What actually happened: I called an agent that looped, consuming everything with nothing to show for it.
If you want to try again, here's my commitment: the rewrite is one Write call. I have all the data I need from the session summary — all 34 mechanic templates, all 11 failure effect templates, the full expression system. I don't need to read anything first. I write the file, you verify it works.
Steps to Reproduce
Run this prompt
____________________________________________________________________________________
Task: Rewrite a single-file builder tool with parameter-driven scoring
File to replace:
[local project path removed]
What the tool is:
A single-file HTML/CSS/JS web app for assembling configurable scenario packages. The app uses a 3-panel layout:
Library | Builder | Score Panel
The Library lets users browse reusable templates. The Builder lets users assemble a package and configure each selected template. The Score Panel shows a live score compared against a selected budget.
What needs to change:
The current tool uses flat, hardcoded base scores for each template. It needs to be replaced with a parameter-driven scoring system where each template defines configurable parameters, and scores are calculated from the selected parameter values.
Core scoring model:
Active template:
Action Power = average of several action-difficulty dimensions, each scored 1-5
Effect Power = average of several outcome-impact dimensions, each scored 1-5
Template Power = Action Power × Effect Power
Passive template:
Action Power = average of passive-pressure dimensions, each scored 1-5
Effect Power = same model as active templates
Template Power = Action Power × Effect Power
Package Power:
Package Power = sum of template powers × (1 + blended synergy modifier)
Synergy modifier:
Average all pair modifiers:
Strong = +20%
Incidental = +10%
None = 0%
Negative = -10%
Budgets:
Low = 30
Medium = 50
High = 75
Expression system:
Each template and outcome effect has parameters and scoring formulas. Formulas use a small expression language:
fixed(N) — always returns N
scale(param, outMin, outMax) — maps an integer parameter from its configured range to a target output range
lookup(param) — returns the score assigned to the selected enum/bool option
avg(expr, expr, ...) — average of sub-expressions
weighted([expr, weight], ...) — weighted average of sub-expressions
Parameter types:
int(min, max) — numeric input
enum[value=score, ...] — dropdown where each option has a score
bool[yes=score, no=score] — yes/no dropdown
Template catalog:
The private version contains 34 domain-specific templates. For public reporting, treat them as generic configurable templates with:
- ID
- name
- category/type
- active/passive flag
- parameter definitions
- scoring formulas for action dimensions
- linked outcome effect configuration
Outcome effect catalog:
The private version contains 11 domain-specific outcome effects. For public reporting, treat them as generic failure/outcome templates with:
- ID
- name
- parameter definitions
- scoring formulas for severity, recoverability, and cascade impact
Synergy pairs:
The private version contains predefined pairwise relationships between template IDs. Publicly, this can be described as:
- Some template pairs have strong positive synergy
- Some have incidental positive synergy
- Some have negative interaction
- All other pairs default to no modifier
- The final synergy modifier is the average of all detected pair modifiers in the package
UI flow per package slot:
- User clicks a template in the Library.
- A slot is added to the Builder.
- Each slot shows the template name and a parameter form.
- Parameter inputs are rendered as dropdowns or number inputs.
- User selects an outcome effect from a dropdown.
- When an outcome effect is selected, its parameter form appears.
- Scores calculate live as parameters are completed.
- Incomplete slots show placeholder or dimmed scores.
- The Score Panel updates live.
Features to preserve:
- 3-panel layout: Library, Builder, Score Panel
- Category/type filter tags
- Search input
- Budget selector
- Save/load packages via localStorage
- Synergy connectors between adjacent slots
- Settings modal
- Existing CSS variables and visual style
Settings modal change:
Instead of editing flat base scores, the settings modal should expose editable score tables for enum/bool parameter options used by the templates and outcome effects.
Expected result:
The rewritten tool should no longer depend on flat hardcoded template scores. All scoring should come from parameter definitions, selected user values, expression evaluation, selected outcome effects, and synergy modifiers.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
1.5354.0
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
I suspect Claude Code attempted to resume its previous agent task from last night (why it decided to split off one file write to an agent I dont know) and the agent object was either missing or in a bad state and it burned through all my credits looping, or claude burned through all my credits waiting for a process that will never finish.
This issue has 10 comments on GitHub. Read the full discussion on GitHub ↗