claude_cli: show subscription usage #171

Merged
hermes merged 1 commits from feat/claude-cli-usage into main 2026-10-19 13:51:55 +00:00
Collaborator

The claude -p provider never emitted StreamEvent::Quota, so statusbar and /usage stayed empty. Now parses rate_limit_event lines (rateLimitType, utilization, surpassedThreshold, status, resetsAt) into QuotaWindow (5h, 7d, 7d opus, ...), accumulated per label. Unit test covers utilization, rejected, threshold, no-percent. Event format taken from memory, not verified against a real claude binary.

The claude -p provider never emitted StreamEvent::Quota, so statusbar and /usage stayed empty. Now parses rate_limit_event lines (rateLimitType, utilization, surpassedThreshold, status, resetsAt) into QuotaWindow (5h, 7d, 7d opus, ...), accumulated per label. Unit test covers utilization, rejected, threshold, no-percent. Event format taken from memory, not verified against a real claude binary.
hermes added 1 commit 2026-10-19 13:51:44 +00:00
hermes force-pushed feat/claude-cli-usage from 7f6ca8d353 to e05f443e52 2026-10-19 13:51:44 +00:00 Compare
hermes merged commit e96f4a6cb8 into main 2026-10-19 13:51:55 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: johannes/hx#171