anthropics / anthropics/claude-code
[BUG]
- Langage dominant
- Python
- Étoiles
- 145k
- Forks
- 23.1k
- Métriques de merge des PR
- Métriques de PR en attente
Description
### Preflight Checklist
- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) 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?
❯ hi
You've hit your monthly spend limit · your session limit resets 2:40pm (Asia/Jakarta)
/usage-credits to adjust your monthly spend limit.
### What Should Happen?
still limit at claude cli, but at web still have credit
### Error Messages/Logs
```shell
```
### Steps to Reproduce
Claude finished the response
lt
Not sure what you meant by "lt" — could you say a bit more about what you're looking for?
Message collapsed
Viewed a file, searched the web
That's not a bug in the CLI — it's two limits stacking. Your plan's included usage for the current 5-hour window is used up, and the fallback (usage credits, formerly "extra usage") has also reached the monthly spend cap you set. So Claude Code has nothing left to draw from until the session window resets at 2:40pm Jakarta time.
Usage credits apply to both Claude conversations and Claude Code, and your combined usage across both counts toward your limits. That includes the subagents in your auto-mode scan — each one burns tokens against the same pool, which is likely why it drained fast.
[Claude](https://support.claude.com/en/articles/12429409-manage-usage-credits-for-paid-claude-plans)
Typing continue won't help; each attempt just re-hits the wall. Your options:
Wait until 2:40pm — session limits reset every five hours, and then you're back on included usage.
[Claude](https://support.claude.com/en/articles/12429409-manage-usage-credits-for-paid-claude-plans)
Raise the spend cap — run /usage-credits in the CLI or go to claude.ai → Settings → Usage. Usage credits are charged separately from your subscription and appear as additional charges on your bill.
[Claude](https://support.claude.com/en/articles/12429409-manage-usage-credits-for-paid-claude-plans)
Reduce burn — switch to a cheaper model with /model and stop the auto-mode scan if you don't need it, so the next window lasts longer.
One thing to double-check: there are reports of Claude Code showing the "monthly spend limit" message when the session limit is at 4% and monthly usage is still available. If Settings → Usage shows you have room left, update to the latest Claude Code version and restart the session.
[GitHub](https://github.com/anthropics/claude-code/issues/79167)
1788318062545_image.png
but in web , its okay not limit
Your screenshot confirms the plan itself is fine — session at 2%, weekly at 11–20%. So the CLI shouldn't be blocked at all. This matches a known Claude Code bug where the CLI reports the monthly spend limit even though the normal session limit is barely used, and it routes requests through usage credits instead of the plan — that report was also on Max 5x.
What's likely happening: your account has usage credits enabled with a monthly cap, that cap was reached (probably by the earlier long auto-mode run), and Claude Code is now incorrectly checking the credits cap first instead of falling back to your included plan usage.
Things to try, in order:
Update Claude Code (claude update or npm i -g @anthropic-ai/claude-code) and restart the session — stale local state can hold onto the limit message.
Run /logout then /login in the CLI to refresh your auth token, in case it's carrying an old entitlement.
In Settings → Usage on the web, check the usage-credits section. Either raise the cap, or temporarily disable usage credits — with credits off, the CLI has no cap to hit and should just use your plan limits.
If it still blocks, wait for the 2:40pm reset and see whether it clears; if it doesn't, it's worth adding your case to the GitHub issue linked above.
1788318419500_image.png
inform that ,, iwann sent isssue wit that tempalte
Here's a draft you can paste into the Claude Code issue form (github.com/anthropics/claude-code/issues → Bug report). Fill in the version/OS lines before submitting.
Title: CLI says "monthly spend limit" hit while plan session limit is at 2% (Max 5x)
What's wrong?
Claude Code blocks all requests with a monthly-spend-limit message, but my plan usage is nowhere near its limits. Settings → Usage on claude.ai shows: Current session 2% used, Weekly all models 11%, Weekly Fable 20%. The web app works normally. It looks like the CLI is checking the usage-credits cap first instead of falling back to included plan usage. Possibly related to #79167.
Steps to reproduce
Be on Max 5x with usage credits enabled and the monthly cap already reached.
Start a session and run an agent task (mine was "Survey frontend API contract" in auto-mode).
Agent fails with: You've hit your monthly spend limit · raise it at claude.ai/settings/usage?from=cc_cli_limit_message · your session limit resets 9:50am (Asia/Jakarta) (error type rate_limit, HTTP 429, request id req_011CedWp7SfmVzRymYvB8g7a, model claude-fable-5-1).
Type continue — same message every time, now saying reset at 2:40pm, even after the 9:50am reset passed.
Open claude.ai → Settings → Usage: session 2%, weekly 11%/20%. Web chat works fine.
Expected behavior
Once the usage-credits cap is reached, Claude Code should keep working on the plan's included usage until the session/weekly limits are actually exhausted.
Actual behavior
Every request is rejected with the spend-limit error despite available plan usage. Only the web app works.
Environment
Claude Code version: (run claude --version)
OS: (e.g. macOS 15 / Windows 11 / Ubuntu 24)
Plan: Max 5x, usage credits enabled
Timezone: Asia/Jakarta
Attach the Settings → Usage screenshot you showed me — it's the strongest evidence. If you have /usage output from the CLI showing the same low numbers, add that too.
Write a message…
[Claude is AI and can make mistakes. Please double-check responses.](https://support.anthropic.com/en/articles/8525154-claude-is-providing-incorrect-or-misleading-responses-what-s-going-on)
### Claude Model
None
### Is this a regression?
Yes, this worked in a previous version
### Last Working Version
_No response_
### Claude Code Version
2.1.258 (Claude Code)
### Platform
Anthropic API
### Operating System
macOS
### Terminal/Shell
Terminal.app (macOS)
### Additional Information
_No response_
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Begin by reproducing the report in Claude Code 2.1.258 on macOS: run /usage and /usage-credits, then compare the CLI result with Settings → Usage on claude.ai. Check whether the behavior persists after the session reset, update, and reauthentication; done means the CLI honors available included plan usage instead of rejecting every request at the usage-credits cap.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- api, cli
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- Active
- Clarté
- Plutôt claire
- Accessibilité débutants
- 48/100