Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
Extends Codex usage collection to support multiple rate-limit pools while retaining legacy fallback behavior.
Changes:
- Collects and orders all Codex usage pools.
- Labels named pools and adds regression coverage.
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 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
bin/omarchy-agent-usage-codex |
Collects grouped Codex rate limits with fallback support. |
test/shell.d/agent-usage-codex-scanner-test.sh |
Tests multiple usage pools and deduplication. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| rateLimitsByLimitId: { | ||
| codex: { | ||
| limitId: "codex", | ||
| limitName: null, | ||
| primary: {usedPercent: 94, windowDurationMins: 10080, resetsAt: 1787196799} | ||
| }, | ||
| codex_bengalfox: { | ||
| limitId: "codex_bengalfox", | ||
| limitName: "GPT-5.3-Codex-Spark", | ||
| primary: {usedPercent: 12, windowDurationMins: 10080, resetsAt: 1787357885} | ||
| } | ||
| } |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
test/shell.d/agent-usage-codex-scanner-test.sh:34
- This fixture already places the default
codexentry first, so the test passes even if the new reordering logic is removed. Putcodex_bengalfoxbeforecodexin the mocked response while retaining the current expected output to cover the stated default-first behavior.
rateLimitsByLimitId: {
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (2)
test/shell.d/agent-usage-codex-scanner-test.sh:74
- The updated fixture now exercises only
rateLimitsByLimitId, but the PR explicitly promises compatibility with older Codex responses that expose only top-levelrateLimits. Add a second collector invocation withoutrateLimitsByLimitIdand assert that its primary/secondary windows are retained, so this fallback cannot regress unnoticed.
[[ $(jq -c '{id, tierLabel, limits}' <<<"$result") == '{"id":"codex","tierLabel":"pro","limits":[{"label":"Weekly (7-day)","percent":0.94,"resetsAt":"2026-08-20T03:33:19+00:00","title":"Weekly limit"},{"label":"GPT-5.3-Codex-Spark · Weekly (7-day)","percent":0.12,"resetsAt":"2026-08-22T00:18:05+00:00","title":"GPT-5.3-Codex-Spark Weekly limit"}]}' ]] ||
fail "Codex collector includes every named usage pool without duplicating the default pool" "$result"
pass "Codex collector includes every named usage pool without duplicating the default pool"
shell/plugins/agents/Panel.qml:122
- This filter is provider-agnostic, so it also removes an untouched Claude session window (as the added Claude test confirms). That is a user-visible behavior change outside the PR's stated Codex-pool scope. Please either restrict the suppression to Codex or explicitly include and justify the cross-provider change in the PR scope.
var isUnusedFiveHour = windowSpanMs(entry.label) === 5 * 3600 * 1000 && percent === 0
if (percent >= 0 && !isUnusedFiveHour)
|
Thanks! Model-scoped Codex limit pools are being considered through #7725, which fits the panel's existing scoped-limit display. Closing in favor of that. |
Why
Codex can return multiple usage pools in
rateLimitsByLimitId, such as the main Codex allowance and a separate GPT-5.3-Codex-Spark allowance. The collector currently reads only the top-levelrateLimitsobject, leaving additional pools invisible in the agents panel.What changed
rateLimitsByLimitIdwhen availableValidation
omarchy-pkgscheckoutgit diff --checkFixes #7873.