You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 22, 2026, 12:45 AM ET / 04:45 UTC.
Summary
The weekly-limit problem is already implemented and shipped; this issue remains useful only for the later request to show extra-credit dollar usage, which needs product approval and a stable xAI billing contract.
Reproducibility: not applicable. to the remaining request: the weekly behavior is covered by current source and release notes, while the requested dollar metric needs an authoritative provider payload rather than a failure reproduction.
Ways to help us reproduce this
Add a screenshot or short recording showing the behavior.
Add expected vs actual behavior.
Include redacted logs or terminal output.
Maintainer decision needed
Question
Recommendation
Should CodexBar add a Grok-specific extra-credit dollar-spend metric when xAI supplies a stable authenticated billing field?
Approve a contract-led metric: Add the metric only after a redacted live xAI payload establishes the authoritative amount and period semantics.
Why: Current behavior deliberately keeps subscription credits as quotas rather than inventing dollar spend, so implementation needs a decision on whether this provider-specific metric belongs in the shared Usage & Spend surface.
Next step
A maintainer must decide whether a provider-specific dollar metric is in scope before a contract-dependent implementation can be bounded.
Review details
Best possible solution:
Keep the shipped weekly-credit path and, if approved, add a separate authenticated extra-credit spend metric only after a redacted stable xAI response defines its currency, scope, reset behavior, and fallback semantics.
Do we have a high-confidence way to reproduce the issue?
Not applicable to the remaining request: the weekly behavior is covered by current source and release notes, while the requested dollar metric needs an authoritative provider payload rather than a failure reproduction.
Is this the best way to solve the issue?
Unclear: the weekly-limit repair is already the narrow supported solution; the extra-credit display should not be implemented until maintainers approve it and xAI’s field semantics are evidenced.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
xAI’s current billing data contract for a separate extra-credit dollar amount is not established in the issue; deriving dollars from subscription credits would misstate spend.
Codex review notes: model internal, reasoning high; reviewed against 27c7f334e3c4.
Label changes
Label justifications:
P3: The original weekly quota handling is shipped; the remaining optional spend display is a low-urgency product decision.
Release provenance: The checked-in v0.50.0 release notes record the CLI billing route reading Grok’s weekly credit pool; the v0.50.0 release commit is contained by later release tags through v0.53.0. (CHANGELOG.md:207, 0e453c4a5b2a)
Maturity helper unavailable: The required maturity shortlist could not run because this checkout lacks qa/maturity-scores.yaml; no maturity label is selected.
Likely related people:
Peter Steinberger: Current Grok usage presentation and local spend conversion lines blame to a Peter Steinberger release commit; the v0.50.0 release tag is also authored by him. (role: recent Grok-area contributor; confidence: high; commits: 22a2168842a9, 0e453c4a5b2a; files: Sources/CodexBarCore/Providers/Grok/GrokProviderDescriptor.swift, Sources/CodexBarCore/Providers/Grok/GrokLocalSessionScanner.swift, CHANGELOG.md)
How this review workflow works
ClawSweeper keeps one durable marker-backed review comment per issue or PR.
Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
Maintainers can also comment @clawsweeper review to request a fresh review only.
Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Maintainer reproduction audit (2026-07-01, CodexBar main 24490b6434d491a5478ea6636f014744ada3cbeb): I could not obtain the one missing artifact—a current authenticated Grok Build billing payload—so I am not changing the parser speculatively.
Current evidence:
xAI's current Grok Build command documentation documents /usage as token and credit usage for the session. It does not publish the subscription limit/reset contract.
The installed official CLI is grok 0.1.211. Its current binary still contains the contract names monthlyLimit, billingPeriodStart, billingPeriodEnd, includedUsed, and totalUsed; there is no weeklyLimit contract name.
A redacted ACP probe successfully initialized the current CLI, then x.ai/billing returned -32601 Method not found. This matches CodexBar's documented limitation, now confirmed on 0.1.211 as well as 0.1.210.
No authorized Grok Build login/browser session was available in the permitted local sources. No unrelated API-platform credential was used as a substitute for the consumer subscription product.
Current CodexBar behavior is internally consistent for the known payload: percent is usage.totalUsed / monthlyLimit; reset comes from billingPeriodEnd; when start and end are available, their duration drives the visible Weekly/Monthly label. The web fallback supplies only upstream percent plus reset time, so it cannot prove the denominator or full cycle length.
Active-PR overlap audit found no open Grok/Grok Build PR or PR touching the Grok provider files.
Minimal proof needed to repair this safely:
grok --version.
A redacted authenticated x.ai/billing result from a CLI/version where that method succeeds. Keep field names; remove tokens/account/team IDs. Timestamps may be shifted together while preserving the start→end duration. Monetary values may be normalized by one common factor while preserving totalUsed / limit.
If the CLI method still fails, a sanitized Grok Build usage screenshot plus the successful billing response captured by Grok's own UI, with cookies/tokens/account identifiers removed. We need the limit field name, used field name, period start/end (or exact duration), and displayed percentage.
The decisive question is whether xAI changed only the billing-cycle duration while retaining monthlyLimit, or introduced a new weekly denominator/field. Those require different fixes. Guessing either could silently display the wrong percentage.
Recommendation: keep open with needs-live-repro; no code/PR until the minimal payload above is available.
Redacted current CLI proof
{"id":1,"result_keys":["_meta","agentCapabilities","authMethods","protocolVersion"],"auth_method_ids":["grok.com"]}
{"id":2,"error_code":-32601,"error_message":"Method not found","result_keys":[]}
Which matches what docs/grok.md says about Weekly/Monthly being a display label over a single window. So right now there is just no second window to show. Either xAI exposes the billing RPC outside the TUI or grok.com starts returning a second window, otherwise there is nothing to parse. Happy to test a branch if that helps.
The original weekly-window behavior is implemented in the current Grok provider, including measured billing periods and Weekly/Monthly presentation (#3679). The later extra-credit dollar-spend request remains separate. Local Grok history currently reports tokens without inventing USD amounts. That extension needs a product decision and a redacted authoritative payload establishing amount, currency, account scope, and period semantics. No additional parser change was made in this review.
Current main supports weekly Grok Build periods and preserves measured monthly windows near reset, including the period handling in #3679 (2c994ef1c3bb). The proxy and menu-model tests pass for weekly duration, near-reset Weekly labels, and measured Monthly labels. This can be closed as addressed; #3947 (landed on main) changes only RPC error classification.
Activity
clawsweeper commentedon Jul 1, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 22, 2026, 12:45 AM ET / 04:45 UTC.
Summary
The weekly-limit problem is already implemented and shipped; this issue remains useful only for the later request to show extra-credit dollar usage, which needs product approval and a stable xAI billing contract.
Reproducibility: not applicable. to the remaining request: the weekly behavior is covered by current source and release notes, while the requested dollar metric needs an authoritative provider payload rather than a failure reproduction.
Ways to help us reproduce this
Maintainer decision needed
Why: Current behavior deliberately keeps subscription credits as quotas rather than inventing dollar spend, so implementation needs a decision on whether this provider-specific metric belongs in the shared Usage & Spend surface.
Next step
A maintainer must decide whether a provider-specific dollar metric is in scope before a contract-dependent implementation can be bounded.
Review details
Best possible solution:
Keep the shipped weekly-credit path and, if approved, add a separate authenticated extra-credit spend metric only after a redacted stable xAI response defines its currency, scope, reset behavior, and fallback semantics.
Do we have a high-confidence way to reproduce the issue?
Not applicable to the remaining request: the weekly behavior is covered by current source and release notes, while the requested dollar metric needs an authoritative provider payload rather than a failure reproduction.
Is this the best way to solve the issue?
Unclear: the weekly-limit repair is already the narrow supported solution; the extra-credit display should not be implemented until maintainers approve it and xAI’s field semantics are evidenced.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 27c7f334e3c4.
Label changes
Label justifications:
P3: The original weekly quota handling is shipped; the remaining optional spend display is a low-urgency product decision.Evidence reviewed
What I checked:
Sources/CodexBarCore/Providers/Grok/GrokCreditsProxyFetcher.swift:10, 27c7f334e3c4)Sources/CodexBarCore/Providers/Grok/GrokProviderDescriptor.swift:157, 27c7f334e3c4)CHANGELOG.md:207, 0e453c4a5b2a)Sources/CodexBarCore/Providers/Grok/GrokLocalSessionScanner.swift:47, 22a2168842a9)Likely related people:
Sources/CodexBarCore/Providers/Grok/GrokProviderDescriptor.swift,Sources/CodexBarCore/Providers/Grok/GrokLocalSessionScanner.swift,CHANGELOG.md)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.steipete commentedon Jul 1, 2026
Maintainer reproduction audit (2026-07-01, CodexBar main
24490b6434d491a5478ea6636f014744ada3cbeb): I could not obtain the one missing artifact—a current authenticated Grok Build billing payload—so I am not changing the parser speculatively.Current evidence:
/usageas token and credit usage for the session. It does not publish the subscription limit/reset contract.grok 0.1.211. Its current binary still contains the contract namesmonthlyLimit,billingPeriodStart,billingPeriodEnd,includedUsed, andtotalUsed; there is noweeklyLimitcontract name.x.ai/billingreturned-32601 Method not found. This matches CodexBar's documented limitation, now confirmed on 0.1.211 as well as 0.1.210.usage.totalUsed / monthlyLimit; reset comes frombillingPeriodEnd; when start and end are available, their duration drives the visible Weekly/Monthly label. The web fallback supplies only upstream percent plus reset time, so it cannot prove the denominator or full cycle length.Minimal proof needed to repair this safely:
grok --version.x.ai/billingresult from a CLI/version where that method succeeds. Keep field names; remove tokens/account/team IDs. Timestamps may be shifted together while preserving the start→end duration. Monetary values may be normalized by one common factor while preservingtotalUsed / limit.The decisive question is whether xAI changed only the billing-cycle duration while retaining
monthlyLimit, or introduced a new weekly denominator/field. Those require different fixes. Guessing either could silently display the wrong percentage.Recommendation: keep open with
needs-live-repro; no code/PR until the minimal payload above is available.Redacted current CLI proof
{"id":1,"result_keys":["_meta","agentCapabilities","authMethods","protocolVersion"],"auth_method_ids":["grok.com"]} {"id":2,"error_code":-32601,"error_message":"Method not found","result_keys":[]}salavatkhafizov commentedon Jul 1, 2026
Looks like siginificant change - even web chats have weekly limits too.
Karasowl commentedon Jul 15, 2026
Same here on Linux, grok CLI 0.2.101 (5bc4b5dfad) with SuperGrok, checked today. Two data points that might save you the repro:
--source clifails outright. The billing method seems to only exist inside the interactive TUI, so the headless call CodexBar makes gets rejected:--source webworks but only ever returns one window, the other slots come back null:Which matches what docs/grok.md says about Weekly/Monthly being a display label over a single window. So right now there is just no second window to show. Either xAI exposes the billing RPC outside the TUI or grok.com starts returning a second window, otherwise there is nothing to parse. Happy to test a branch if that helps.
8 remaining items
gianpaj commentedon Sep 4, 2026
I found this PR that's been worked on for a bit: #3236
Hopefully it will be merged soon :)
steipete commentedon Sep 23, 2026
The original weekly-window behavior is implemented in the current Grok provider, including measured billing periods and Weekly/Monthly presentation (#3679). The later extra-credit dollar-spend request remains separate. Local Grok history currently reports tokens without inventing USD amounts. That extension needs a product decision and a redacted authoritative payload establishing amount, currency, account scope, and period semantics. No additional parser change was made in this review.
steipete commentedon Sep 24, 2026
Current main supports weekly Grok Build periods and preserves measured monthly windows near reset, including the period handling in #3679 (
2c994ef1c3bb). The proxy and menu-model tests pass for weekly duration, near-reset Weekly labels, and measured Monthly labels. This can be closed as addressed; #3947 (landed on main) changes only RPC error classification.