Repository navigation
Conversation
Read live subscription_tier_display and auth email for the hero, keep API product strings on the meters, and chart turn_completed tokens from local Grok sessions.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
Adds Grok usage collection and display support to the agents panel.
Changes:
- Collects Grok billing limits, account details, and local token usage.
- Adds Grok panel metadata, status rendering, and icons.
- Adds documentation and scanner tests.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 5 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
bin/omarchy-agent-usage-grok |
Implements the Grok collector. |
shell/plugins/agents/Main.qml |
Passes account email to the panel. |
shell/plugins/agents/Panel.qml |
Renders email, statuses, and reset times. |
shell/plugins/agents/manifest.json |
Enables and describes Grok. |
shell/plugins/agents/README.md |
Documents the Grok data sources. |
shell/plugins/agents/assets/grok.svg |
Adds the dark-surface icon. |
shell/plugins/agents/assets/grok-light.svg |
Adds the light-surface icon. |
test/shell.d/agent-usage-grok-scanner-test.sh |
Tests Grok collection behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| | `claude` | Anthropic's OAuth usage endpoint (5-hour session + 7-day weekly) | `~/.claude/projects` transcripts, opencode sessions on an Anthropic provider, plus `stats-cache.json` and `history.jsonl` as fallback | | ||
| | `codex` | The Codex app-server RPC | native Codex CLI session files (plus pi and opencode sessions) | | ||
| | `fireworks` | Estimated prepaid balance: configured funding minus rated account costs | Fireworks billing API, grouped by day and model for the last 30 days | | ||
| | `grok` | Grok CLI-proxy billing (`/v1/billing?format=credits`) plus `subscription_tier_display` from `/v1/settings` | `turn_completed` usage in `~/.grok/sessions/*/updates.jsonl` | |
|
Automated duplication check: this pull request looks similar to #9498, which covers the same Grok usage collector. I keep that one open and close this one to consolidate review. If you feel this is the wrong decision, please open the PR again with a note on the difference. |
Posted by Grok on behalf of Enoch Lam.
Discussion: #8279
What
Grok (official
grokCLI / SuperGrok) was missing from the agents usage panel. This addsomarchy-agent-usage-groksoomarchy-agent-usage-updatepicks it up like Claude, Codex, and Fireworks.Behavior
subscription_tier_displayfrom/v1/settings(live, not hardcoded).~/.grok/auth.jsonwhen present.GrokBuild,GrokChat). The weekly window label is derived fromcurrentPeriod.type(USAGE_PERIOD_TYPE_WEEKLY→Weekly). Pay-as-you-go with cap 0 isOff(no fake 0% bar).turn_completed.usagein~/.grok/sessions/*/updates.jsonl.recentDays.messageCountis a token total, same as Claude/Codex. Cached-read is already inside GrokinputTokens, so it is not added twice.assets/grok.svg(white) andassets/grok-light.svg(black), same pair convention as Codex.Tests
./test/shell.d/agent-usage-grok-scanner-test.sh(and existing agents panel / usage-update tests still pass).Notes
GROK_HOMEoverrides~/.grok. The panel changes are additive (accountEmail, limitstatus); other collectors ignore the new fields.