[BUG] resume flag fails to maintain conversation context after hitting usage/context limits
Open 💬 17 comments Opened Jul 8, 2025 by jamiejsmith96
Bug Summary:
When a Claude Code session hits context/usage limits and ends with "Claude AI usage limit reached", the --resume
flag completely fails to restore any conversation context, resulting in total loss of session state.
Steps to Reproduce:
- Start a Claude Code session and work on a multi-step task
- Session hits context/usage limits and displays "Claude AI usage limit reached|[timestamp]"
- Restart Claude Code with --resume flag
- Previous conversation context is completely lost despite resume flag
Expected Behavior:
The --resume flag should restore conversation state even after hitting limits, allowing continuation of work with
maintained context.
Actual Behavior:
- Complete loss of conversation history after hitting limits
- --resume provides no recovery of previous session state
- User must re-explain entire project context and tasks
- System shows "Claude AI usage limit reached|1751911200" but no context restoration
Impact:
- Makes long development sessions impossible to continue
- Context limits become session-ending rather than manageable interruptions
- Undermines the core value of persistent AI assistance for complex tasks
- Forces users to restart complex workflows from scratch
Environment:
- Platform: linux
- OS: Linux 5.15.167.4-microsoft-standard-WSL2
- Date: 2025-07-08
Additional Context:
This suggests the resume functionality doesn't properly handle context limit scenarios, making it ineffective
when most needed.
17 Comments
I’m aware that similar issues have been raised, but in addition to the point mentioned above, it's also important to note that when reusing subagents (i know subagents are stateless) with /resume inside claude cli, previous tasks or actions are lost if the conversation reaches usage limits - meaning there is no track or realtime update on the status of agents' progress.
Does it happen with GitHub app as well?
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Claude Code version
2.1.12still fails to resume the conversation or continue work when the rate limit is hit while a sub‑agent is running. Users have to restart from scratch or manually prompt the agent to determine where it was interrupted. This should be treated as a high‑priority bug.Considering the impact on one's paid-for limits, this is a pretty egregious bug to have. Even within an active session, initiating
/resumeafter the limits reset just re-triggers the message that one has hit the limit, erroneously. Additionally, there seems to be discrepancies between the limit the session is measuring against and the usage from one's usage on the website (even after waiting hours for any trickle-in statistics to filter in), so that's yet another (related) bug.Just ran into this. Would be nice to have this handled with a clean 'pause' given the costs.
In the meantime, Telling it
continuegot it going again, but it seemed to have lost where it was and had to start over, killing a few extra tokens.I found that "continue where you left off" works pretty well.
This bug is still extant, or at least a very similar one. Claude Code 2.1.70.
After compacting, Claude Code reported "You've hit your limit · resets 4am (America/New_York)" after cooking for 10:44. I waited the several minutes until 4am and found it had no knowledge of the session, going back to 03:09 based on timestamps on files we were working on.
Because it clears the terminal scroll back buffer when it compacts, I couldn't even scroll back to get it. So I lost an hour of work, an hour of sleep, and an hour of credits to this bug.
The bug is still relevant. This should've been treated with high-priority, yet here we're still losing all conversational context in a deep session and no way to redeem it. Auto-compaction is dangerous and I learnt it the hard way, I'll just turn off because this issue doesn't look like will be addressed soon anyway.
Still having this bug, I think Anthropic wants me to pay for additional use and that's why still not solved
I have also noticed this bug. There should probably be some kind of UI element added to the various interfaces to Claude to "Try resume" after the notification about the limit being hit has been displayed
Still having this bug today on MacOS. When will this be planned? All my conversations cannot be resumed anymore which creates an incredibly frustrating/unusable situation.
I ran into this issue and was repeatedly issuing a "continue" command needlessly burning tokens for zero results.
At the VERY least, when Claude halts because it runs out of tokens, a warning should be issued that Claude may loose context,
Just had this happen again:
By the time I got back to the console, it was _already_ past 10am though.
The obvious default would be to have it wait and automatically resume once the limit has reset, maybe even give it a few random minutes so the compute doesn't get slammed at the top of every hour.
There's got to be better ways of handling this
Have had this exact issue happen to me multiple times and it is becoming a deal breaker. I've had it stop when it was right in the middle of writing code leaving me with broken code that needs to be rolled back to the previous commit. And just like everyone else has mentioned I then have to burn through more tokens either redoing the work that was partially completed or trying to salvage the partially completed work. Either credit us back for the wasted tokens, keep the context so that we are able to pick back up or do like Codex does and at least finish out the current task!
try this repo : https://github.com/Snipara/snipara-companion it does exactly that... resume the work so Claude can continue the job using the hooks...
Hey, I solved the problem the way it cost 0 tokens. No need to write into memory or save what Claude was doing. No need for Claude to re-read. No need to run prompt again manually. Check out this project I'm working on: https://github.com/drkh-n/claude-hibernate
You can see the demo how it works.