Expand description
How much of an account’s usage windows is used, from the report Claude Code sends with every request.
Every request’s rate_limit_event frame carries
rate_limit_info.unifiedWindows.<window>.{utilization, resetsAt} for each plan window
(five_hour, seven_day, …), whatever its status (CLI 2.1.301: utilization is a fraction
from 0 to 1, resetsAt is unix seconds). Every agent on one account reports the same windows, so
the readings are kept per account, not per pane: the newest frame from any pane wins, a pane
closing loses nothing, and a window’s reading is dropped once its reset has passed.
A reading that crosses a notice threshold (agent:usagenoticeat, agent:usagenoticehighat; a
percent of the window, 0 turns one off) gives the leaders of the account’s agents one
[AgentMux] note, once per window per threshold. The note is held for the leader’s next turn or
joins the turn it is in: it never starts one.
Providers other than Claude report nothing here; UsageStatus::NotReported says so.
Structs§
- Account
Usage - An account’s usage as an agent or a window reads it.
- Crossing
- A threshold a reading has newly crossed.
- Usage
Window - One window’s latest reading for an account.
Enums§
- Usage
Status - Whether an account’s usage is known.
Constants§
- DEFAULT_
NOTICE_ AT - DEFAULT_
NOTICE_ HIGH_ AT - SETTING_
NOTICE_ AT agent:usagenoticeat: the percent of a usage window from which the account’s leaders get a note.- SETTING_
NOTICE_ HIGH_ AT agent:usagenoticehighat: the percent from which they get a second, stronger one.
Functions§
- install_
config - Attach the live settings (bootstrap), so the notice thresholds can be read.
- observe
- Keep
windows(fromwindows_of_frame) asaccount’s latest atnow_ms, and say which thresholds they newly cross. A reading for a window that resets earlier than the one kept is a frame from the window before: ignored. A later reset is a new window, and tells again. - observe_
claude_ frame - Any frame of
block_id’s CLI: arate_limit_eventwith usage is kept for the pane’s account, and its leaders told when it crosses a threshold. The persistent stdout reader calls it for every frame; anything else returns at once. - of_
account account’s windows that have not reset atnow_ms, with their age.- reports_
usage - Whether the provider’s CLI reports usage windows that srv reads: Claude’s
rate_limit_event. Codex and Gemini report nothing srv reads, so their accounts saynot_reported. - windows_
of_ frame - The windows a
rate_limit_eventframe reports: name, utilization (0 to 1) and reset (unix seconds). Empty for any other frame, and for a window with no utilization.