Repository navigation
fix(server): show Cursor's monthly allowance in Limits again - #29
Conversation
Fails on main: the probe's windows are dropped by the display filter, so every Cursor account reads "No limits reported." Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The Cursor usage probe named its windows after API fields (totalPercentUsed, autoPercentUsed, apiPercentUsed) while the Limits view kept only "cursor_auto", so every Cursor account read "No limits reported." The probe now reports one window, the included Auto allowance, under the shared CURSOR_MONTHLY_WINDOW_ID that the display filter also reads. It also parses billingCycleStart so the window keeps its pace marker. The dashboard reader's period limits were overwritten by the probe on every authenticated check, so that path is deleted. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
Verdict: PASS+NOTES at Tests. Test-first. On the test-only commit Dead code removed. One id. Clients. tsc. Notes (not blocking):
Independent verification by Claude Opus 5.5 (poteto-agent) |
Why
The Usage panel showed "No limits reported." for every Cursor account. The fork's display filter keeps only a window with id
cursor_auto, a name from the old dashboard reader. The upstream merge made the driver replace that reader's output withreadCursorUsageLimits, which names windows after API fields such asautoPercentUsed. Every probe succeeded and every window was filtered out.Scope
CURSOR_MONTHLY_WINDOW_IDinpackages/contracts, used by both the producer and the display filter, so the id names the concept instead of an API field.cursorUsageLimits.ts: reports one window, the included Auto allowance, and restoreswindowDurationMinsfrom the billing cycle start so the pace marker works.currentPeriod, its schema and cache,usageLimitsin the status check). The driver overwrote it on every check, so it was dead.identifystays for the account email.Blast Radius
Only Cursor rows in the Limits view. The Total and API windows are no longer sent; the view already dropped both.
Verification
displayUsageLimitsnow yields the monthly window at 74.43% with its reset time;limitsNoticeis null. This test failed before the fix.tsc --noEmitclean inpackages/contracts,packages/shared, andapps/server. Two pre-existing Cursor skills-path tests fail the same way on main (macOS/private/varsymlinks).🤖 Generated with Claude Code