[BUG] API ERROR: Rate Limit Reached with 0% of my session or weekly usage even touched.
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 have 1-2% of my weekly and current session usage. I have in fact never gone over usage. Yet, while having extra usage on because Claude gave me a $50 credit a few weeks ago, it ate up all of my credit AND overcharged despite having a $50 limit set. It went to $51.66 and it fully blocked me from using any of MY ALREADY PAID FOR PLAN until i paid off that $1.66. So, I added $5. Within an hour of very light prompting, my usage went to 4% and an additional $1.81 was taken from my extra usage despite having 95% of my current session and weekly usage still available. Additionally, it would not function until i set my ceiling of spending to $55.
So to be concise. Claude code charged extra usage while not going above my normal plan usage bounds. Claude code exceeded the ceiling I set by $1.66. Claude code rate limited me until A) I paid the $1.66 off and B) I raised my ceiling to $55 of extra usage. Claude code continued to charge an additional $1.81 of extra usage TODAY while barely using 2-3% of my plan.
For context, I am on the 20xMax $200/mo plan.
What Should Happen?
I should never ever be charged until 100% of my usage, but am being charged extra regardless and my usage was being restricted from me until i covered the debt despite me having set a hard limit
Error Messages/Logs
Just an API Rate Limit Error
Steps to Reproduce
Simply using it. Again, I have 95%+ available usage, but am being overcharged beyond my limit
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.86
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
14 Comments
I've posted my solution to this issue https://github.com/anthropics/claude-code/issues/19018#issuecomment-4146364489
@0nly1ken0bi it did not work for me and within minutes of me posing, my extra usage went to $55.58 spent and I am once again being rate limited. I have been at work all day and have used 2% of my current session and 1% of my week
@newcomerd33-wq What was your last successful request before getting that message limit notification? It took me a while to revert back to the last successful response because I had to sift through all my botched attempts at resolving this problem.
Run /config and make sure auto compact is set to TRUE then go back press ESC 2-3 times to pull your Rewind History and just go back to an earlier prompt where you got a successful response prior to hitting the message limit notification.
Yes this does seem like a bug they need fix but this is what worked for me in order for me to continue working.
You may even to fork the response although I didn't have to that.
I'm just rehashing the steps I took to get pass that annoyance/hindrance.
@0nly1ken0bi it was only 10 messages ago, so i went back 15. immediately hit the rate limit. I went in and adjusted my extra spending to $56, it responded to "hello" with a generic "what do you want to work on" response. I then turned extra spending OFF, and it turned itself back ON. I turned it back off again and it rate limited me
@newcomerd33-wq Have you tried running /claude doctor? Perhaps it will detect some issue that something may have broken your install.
I'm just grabbing at straws here to try and help you.
@0nly1ken0bi doesnt show me anything. At a loss. Anthropic Support never responds either. Odd thing is that it seems to work on a different machine earlier today, so i may just have to see if thats still the case tomorrow and if someohow this machine is screwed up
@newcomerd33-wq Oooff...that's unfortunate....I wish you luck with that back up machine but I agree....I got lucky by using a band aid, hopefully it doesn't turn around to bite me.
Keep me posted and goodluck
@0nly1ken0bi appreciate your assistance, best of luck. seems like more of these reports are streaming in too
@newcomerd33-wq Just as an aside you may also want to consider try doing the following:
kill
session(terminal)run
claude --resume xxxx-1111-zzzzz-2222-yyyy-000000xxxxxxrun
/resumeJust get your ID right
Had the same issue, I solved it by switching a model, ("/model" then I pressed enter) I switched to the recommended Sonnet model by typing "/Model" then enter, it let me pick the model, I pressed enter on Sonnet and Claude got back to working.
I then wrote "/Model" again and switched back to Opus 4.6 and it was working, no more the API error.
@jjames-cell you beautiful person, it worked.
You too! much appreciated!
so nice to open github and seeing it
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.