Repository navigation
Conversation
Codex grants accounts "reset credits": banked resets that clear a rate limit window before it runs out. The app-server RPC the collector already speaks does not report them, so nothing in the agents panel ever showed one — an account holding a free reset had no way to learn it from Omarchy. The collector reads them from the same backend the Codex CLI authenticates against, reusing the token `codex login` wrote, and the panel prints the count under LIMITS. - the fetch is advisory: signed out, offline, or a changed endpoint all report nothing and the record still reaches the panel intact - a read that reports no banked resets stays distinct from a read that never happened, though neither prints — a standing "0 resets banked" line is noise on an account that never has any - the count is per-account, so it stays out of the cross-device snapshot the way limits and balances already do
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Codex banked reset-credit reporting to the Agents panel.
Changes:
- Fetches and parses reset credits from the authenticated ChatGPT backend.
- Propagates the count through the provider model and displays it under limits.
- Adds collector tests for counts and failure scenarios.
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 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
bin/omarchy-agent-usage-codex |
Fetches and parses banked resets. |
shell/plugins/agents/Main.qml |
Normalizes reset-credit data. |
shell/plugins/agents/Panel.qml |
Displays banked resets. |
test/shell.d/agent-usage-codex-reset-credits-test.sh |
Tests parsing and failure behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+614
to
+615
| Text { | ||
| visible: root.bankedResets > 0 |
Contributor
|
Thanks! The Codex collector now reads banked resets from the app-server reply (rateLimitResetCredits), and the panel shows them under Codex ("4 free resets · next expires in…"), without a separate call to chatgpt.com. Closing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Codex grants accounts "reset credits" — banked resets that clear a rate limit window before it runs out. An account holding one has no way to learn that from Omarchy:
account/rateLimits/read, which the collector already speaks, does not report them, so nothing ever reached the agents panel.I went looking for this after hitting a weekly window at 63% and finding out from the ChatGPT web UI, not from the bar, that I had a free reset sitting unused.
What changed
bin/omarchy-agent-usage-codexreadsGET /backend-api/wham/rate-limit-reset-creditsfrom the same backend the Codex CLI authenticates against, reusing the tokencodex loginalready wrote toauth.json, and reports it asresetCreditsAvailable.shell/plugins/agents/Main.qmlcarries the count into the provider view model, normalized to-1when a collector never read it.shell/plugins/agents/Panel.qmlprints it under LIMITS: "1 reset banked".Notes
providerSnapshot()the way limits and balances already do, rather than merging across devices.titleon a limit entry, sincetitlealready means the window's name (Claude emits "Fable Weekly", and Codex collector: plan label and model-scoped limit windows #7725 extends that).resetCreditsAvailableis deliberately provider-neutral — a Grok collector can fill it in with no panel change.Testing
test/shell.d/agent-usage-codex-reset-credits-test.shcovers the reported tally, a zero, the fallback that counts credits when a response omits the tally (skipping spent, expired, and unparseable ones), an unreachable endpoint, and being signed out. It followsagent-usage-claude-limits-test.sh: the collector loads as a module and a recorded payload stands in for the response, so the suite makes no network call.Verified in the running shell against a real account holding one banked reset: