Allow Claude Code to self-monitor token usage and auto-resume after rate limit reset
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Currently, when Claude Code hits a usage/rate limit during a long task, the session is blocked and the user must manually resume after the limit resets. Claude has no visibility into its own token consumption or remaining quota.
Proposed Solution
Expose token usage / remaining quota info within the session (e.g., percentage used, reset timestamp)
When approaching the limit (e.g., 95%), Claude could proactively pause, read the reset time, and use ScheduleWakeup to automatically resume at the exact reset moment
This would enable fully unattended long-running tasks without manual intervention
Why this is currently impossible:
This is a catch-22: Claude can't set a timer because it's already blocked when the limit hits, and it can't preemptively pause because it has no visibility into usage. Solving either side would unlock the other.
Alternative Solutions
_No response_
Priority
Critical - Blocking my work
Feature Category
CLI commands and flags
Use Case Example
Users running complex multi-step tasks (e.g., batch data entry, large refactors) that exceed a single rate limit window.
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗