Before submitting
Area
apps/server
Steps to reproduce
- Sign in to Grok CLI (OIDC / SuperGrok account,
~/.grok/auth.json).
- Be at 0% usage for the current weekly period (e.g. right after the weekly reset, no Grok usage yet).
- Open Usage > Limits.
Expected behavior
Grok shows a Weekly window at 0% used (100% left), resetting at currentPeriod.end. The Grok CLI's own /usage > "Usage limit" tab shows "Weekly limit (SuperGrok) 0%, Resets: October 11".
Actual behavior
Usage page shows the warning Grok: No limits reported.
Cause: grokUsageResponseToLimits (grokUsageLimits.ts) returns windows: [] when config.creditUsagePercent is undefined. The GET https://cli-chat-proxy.grok.com/v1/billing?format=credits response omits creditUsagePercent when it is 0 (proto3-style default omission), even though currentPeriod is present:
{"config":{"currentPeriod":{"type":"USAGE_PERIOD_TYPE_WEEKLY","start":"2026-10-04T03:32:07.369992+00:00","end":"2026-10-11T03:32:07.369992+00:00"},"onDemandCap":{"val":0},"onDemandUsed":{"val":0},"isUnifiedBillingUser":true,"prepaidBalance":{"val":0},"topUpMethod":"TOP_UP_METHOD_SAVED_PAYMENT_METHOD","billingPeriodStart":"2026-10-04T03:32:07.369992+00:00","billingPeriodEnd":"2026-10-11T03:32:07.369992+00:00"}}
Suggested fix: when creditUsagePercent is undefined but currentPeriod is present, treat it as 0 instead of returning an empty window list. For example, const usedPercent = response.config?.creditUsagePercent ?? (response.config?.currentPeriod ? 0 : undefined).
Impact
Cosmetic issue
Version or commit
0.0.46-nightly.20261004.2657
Environment
Ubuntu 26.04 (elitedesk) and a Windows laptop, T3 nightly, Grok CLI 1.0.46, SuperGrok (unified billing user).
Workaround
Use Grok until usage is non-zero (the field then appears), or check the Grok CLI /usage view. Not yet confirmed: a tiny test prompt did not make the field appear.
Before submitting
Area
apps/server
Steps to reproduce
~/.grok/auth.json).Expected behavior
Grok shows a Weekly window at 0% used (100% left), resetting at
currentPeriod.end. The Grok CLI's own/usage> "Usage limit" tab shows "Weekly limit (SuperGrok) 0%, Resets: October 11".Actual behavior
Usage page shows the warning
Grok: No limits reported.Cause:
grokUsageResponseToLimits(grokUsageLimits.ts) returnswindows: []whenconfig.creditUsagePercentisundefined. TheGET https://cli-chat-proxy.grok.com/v1/billing?format=creditsresponse omitscreditUsagePercentwhen it is 0 (proto3-style default omission), even thoughcurrentPeriodis present:{"config":{"currentPeriod":{"type":"USAGE_PERIOD_TYPE_WEEKLY","start":"2026-10-04T03:32:07.369992+00:00","end":"2026-10-11T03:32:07.369992+00:00"},"onDemandCap":{"val":0},"onDemandUsed":{"val":0},"isUnifiedBillingUser":true,"prepaidBalance":{"val":0},"topUpMethod":"TOP_UP_METHOD_SAVED_PAYMENT_METHOD","billingPeriodStart":"2026-10-04T03:32:07.369992+00:00","billingPeriodEnd":"2026-10-11T03:32:07.369992+00:00"}}Suggested fix: when
creditUsagePercentis undefined butcurrentPeriodis present, treat it as 0 instead of returning an empty window list. For example,const usedPercent = response.config?.creditUsagePercent ?? (response.config?.currentPeriod ? 0 : undefined).Impact
Cosmetic issue
Version or commit
0.0.46-nightly.20261004.2657
Environment
Ubuntu 26.04 (elitedesk) and a Windows laptop, T3 nightly, Grok CLI 1.0.46, SuperGrok (unified billing user).
Workaround
Use Grok until usage is non-zero (the field then appears), or check the Grok CLI
/usageview. Not yet confirmed: a tiny test prompt did not make the field appear.