[BUG] Session limit blocks usage immediately despite 0% actual consumption and after plan upgrade
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?
My session was blocked with "You've hit your session limit" immediately when running a scheduled task, even though /usage shows only 1% of the session limit consumed, $0.0000 total cost, and 0 input/output/cache tokens used.
I attempted to resolve this by running /upgrade, which completed successfully ("Login successful"). However, immediately after upgrading, running a command still returned the same session limit error with the exact same reset time (8:10am / later 8:20am, Asia/Jakarta), indicating the block was not tied to actual usage or cleared by the upgrade.
Steps to Reproduce
- Have a scheduled task running (in my case, triggered at 3:31am Asia/Jakarta)
- Task fails immediately with "You've hit your session limit · resets [time] (Asia/Jakarta)"
- Run /upgrade — completes with "Login successful"
- Run a test command again — same session limit error appears, same behavior
- Check /usage — shows:
- Current session: 1% used
- Total cost: $0.0000
- Total duration (API): 0s
- Usage: 0 input, 0 output, 0 cache read, 0 cache write
- Resets 8:20am (Asia/Jakarta)
- Current week (all models): 10% used, resets Jul 14
Expected Behavior
Session should not be blocked when actual usage is 1% and cost is $0. Upgrading the plan should also immediately clear/reset the erroneous session block, per expected behavior described in issue #29223.
Actual Behavior
Session limit block persists and reappears identically even after a successful plan upgrade, with no correlation to the /usage numbers shown.
Environment
- Interface: Claude Code CLI (scheduled task)
- Timezone: Asia/Jakarta
- Plan: [isi plan kamu, misal Pro/Max]
- Date/time observed: Jul 8, 2026, ~3:28–3:32am Asia/Jakarta
Additional Context
This appears related to previously reported issues #29223, #31367, and #54750 regarding session/limit state not syncing correctly with actual usage or plan changes. Screenshots available showing the discrepancy between /usage (1% used, $0 cost) and the session block message.
What Should Happen?
Claude Code should not block session usage when actual consumption is 0-1%. The session limit block should only trigger based on real usage, and upgrading the plan (via /upgrade) should immediately clear an erroneous session block instead of showing the identical error again.
Error Messages/Logs
You've hit your session limit · resets 8:10am (Asia/Jakarta)
/upgrade to increase your usage limit.
[After running /upgrade — "Login successful"]
You've hit your session limit · resets 8:10am (Asia/Jakarta)
/upgrade to increase your usage limit.
[/usage output]
Current session: 1% used
Resets 8:20am (Asia/Jakarta)
Total cost: $0.0000
Total duration (API): 0s
Usage: 0 input, 0 output, 0 cache read, 0 cache write
Current week (all models): 10% used, resets Jul 14 at 5pm (Asia/Jakarta)
Steps to Reproduce
<img width="812" height="184" alt="Image" src="https://github.com/user-attachments/assets/407c2c10-a5de-4d20-b815-1d402d3a892c" />
<img width="742" height="370" alt="Image" src="https://github.com/user-attachments/assets/ba55a2f7-9c0b-4ac0-8054-3414f8e0add3" />
<img width="696" height="263" alt="Image" src="https://github.com/user-attachments/assets/db572910-ef65-46e4-935c-2a9be76099e2" />
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.195
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_