-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Open
Labels
enhancementNew feature or requestNew feature or requestplatform:windowsIssue specifically occurs on WindowsIssue specifically occurs on Windows
Description
Feature Request
Problem
The statusLine command receives JSON input via stdin with useful fields like cost, context_window, and model. However, rate limit utilization data is missing from this input.
Claude Code already has access to this data internally via anthropic-ratelimit-unified-* API response headers, and it's displayed through the /usage command. But custom statusLine scripts cannot access it.
Current statusLine JSON (v2.1.39)
{
"cost": { "total_cost_usd": 10.07, ... },
"context_window": { "used_percentage": 83, ... },
"model": { "id": "claude-opus-4-6", "display_name": "Opus 4.6" }
}Proposed Addition
{
"rate_limits": {
"five_hour": {
"utilization": 0.45,
"resets_at": 1739500800
},
"seven_day": {
"utilization": 0.12,
"resets_at": 1740000000
},
"seven_day_opus": {
"utilization": 0.30,
"resets_at": 1740000000
}
}
}Use Case
Max plan ($200/mo) users want to monitor their rate limit consumption in real-time through custom statusLine scripts. Currently, the only way to check is via the /usage slash command, which requires manual input and interrupts workflow.
With this data exposed, users could display something like:
🕒 14:30 | 🤖 Opus 4.6 | 💰 $10.07 (45% of 5h limit) | 📊 83% ctx
Why This Matters
- The data already exists in Claude Code's memory (parsed from API response headers)
/usagecommand already displays it — this just exposes it to statusLine- Minimal implementation effort — pass through existing internal state
- High value for power users managing usage across sessions
Environment
- Claude Code v2.1.39
- Windows 11
- Max 20x plan
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestplatform:windowsIssue specifically occurs on WindowsIssue specifically occurs on Windows