Files
pipelines/app/notes/chat-account-usage.md
T
alan 10049b8062 Chat info: account quota per harness (Claude rate_limit_event, Codex account/rateLimits, OpenCode unsupported)
Usage frames carry optional usage.account {harness, source, plan, as_of,
windows[{id,label,used_percent,resets_at}], unsupported}. Claude Code quota
comes from its rate_limit_event stream lines and the initialize account
(plan), shared across chats on the same account. Codex reads
account/rateLimits/read once per connection (re-read when a chat opens after
5 min) and merges account/rateLimits/updated. OpenCode exposes no quota API
and says so. The app's chat info sheet shows an Account usage section with a
progress bar and reset countdown per window, Material and Cupertino.
2026-11-02 18:57:13 +00:00

14 lines
775 B
Markdown

# Chat info: account usage
The chat information sheet shows an "Account usage" section from
`usage.account` (wire shape in docs/cli.md): one LinearProgressIndicator per
reported window ("42% used · resets in 2h 14m"), the plan and "as of <age>".
Cupertino draws the same indicator in system fill/tint colors, since Cupertino
has no linear progress control. An unknown quota hides the section; OpenCode
(no quota API) shows "Not reported by OpenCode". Countdowns tick every 30 s.
Evidence: `test/features/chat/conversation/chat_account_usage_test.dart`
(both hosts), and captures from the probe fixture with `?chats=1&quota=claude`
or `quota=opencode` (`tool/perf/perf_fixture.dart`), opened at
`/chat/perf-chat-0` and clicking the title, 560x1000, Material and Cupertino.