Feature Request: Auto-pause when approaching usage limit to prevent work loss
Resolved 💬 4 comments Opened Apr 13, 2026 by koreamanse Closed Jun 22, 2026
Problem
When running long autonomous workflows (e.g., batch processing with multiple sub-agents), hitting the usage limit mid-task causes work loss:
- Sub-agents may fail mid-write, leaving files in inconsistent state
- Main agent loses context and can't complete validation/commit cycle
- User has to manually recover and figure out what was completed vs. what failed
Currently there's no way to know how close you are to the limit until you hit it.
Proposed Solution
Add an auto-pause threshold setting that stops launching new work when usage approaches the limit:
{
"usage": {
"autoPauseThreshold": 90,
"onThresholdReached": "pause"
}
}
Behavior:
- Before each tool call (especially
Agentlaunches), check current usage percentage - If usage ≥ threshold (e.g., 90%), finish current in-flight work but don't start new batches
- Notify user: "Usage at 92% — pausing to prevent work loss. Resume after limit resets."
- Allow user to override: "continue anyway"
Why this matters for sub-agent workflows:
- Multiple parallel sub-agents consume tokens rapidly
- If limit hits mid-batch, some agents fail while others succeed → inconsistent state
- With auto-pause, the last batch completes cleanly and stops gracefully
Current Workaround
User manually estimates batch count and says "do N batches then stop" — but this is imprecise since there's no visibility into remaining usage.
Nice-to-haves
claude usageCLI command to check current usage/remaining percentage- Usage percentage visible in VS Code status bar
- Webhook/notification when threshold reached
Environment
- Claude Code VS Code Extension + CLI
- Windows 11 / macOS
- Max plan (weekly usage limit)
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗