GeezerVison is showing github.com — fix(cursor): wait for Keychain approval before timing usage requests by zaydiscold · Pull Request #24450 · pingdotgg/t3code
Conversation
zaydiscold
commented
Oct 24, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Cursor Usage → Limits could fail while a user was approving the macOS Keychain prompt: the usage reader wrapped credential lookup in a ten-second deadline, but the Keychain reader allows thirty seconds for approval. An approval after twelve seconds therefore arrived after the quota read had already failed.
Start the ten-second timeout at the HTTP usage request instead, preserving the existing Keychain approval deadline. A Keychain timeout now tells the user to allow access and refresh limits. The quota response body remains inside the network deadline.
A regression with twelve-second approval failed before this change and passes afterward. A second test verifies that a stalled HTTP request still times out after approval. After merging current main, vp run check:changed passes formatting, lint, both knip checks, five affected package typechecks and the usage-limit tests. Live CLI authentication and the usage API were previously verified on macOS; the installed desktop app displayed both monthly pools. This fixes the deadline ordering; it does not resolve signing-identity or Keychain trust failures.
Related: #24443 and #21228 address browser-auth usage credential selection. This change fixes the timing of the existing opt-in Keychain path.
Scope: this is a focused correction to conflicting deadlines in an existing opt-in usage probe, submitted under CONTRIBUTING's obvious-bug exception. No permission defaults or credential-storage rules change.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved at 7f3e060
Macroscope's review found this PR approvable — This is a focused fix to an existing opt-in Cursor Keychain usage path: Keychain approval can complete before the 10-second HTTP request deadline begins, while stalled network requests remain bounded. Targeted regression tests cover both timing behaviors, and no product defaults or static-analysis suppressions are changed.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 24, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Important
Review skipped
Review was skipped as selected files did not have any reviewable changes.
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 7f3e060 and 698065e.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review.
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between d53873b and 7f3e060.
Files selected for processing: 2
-
packages/provider-cursor/src/server/usageLimits.test.ts
packages/provider-cursor/src/server/usageLimits.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
Walkthrough
-
The 10-second timeout now applies to the Cursor HTTP request and response decoding, rather than the full usage-reading flow. Keychain timeouts return unavailable limits with reason probeFailed. New tests cover delayed Keychain approval and a stalled request.
Changes: Cursor usage-limit timeout
| Layer / File(s) |
Summary |
Request timeout and timeout handling packages/provider-cursor/src/server/usageLimits.ts, packages/provider-cursor/src/server/usageLimits.test.ts |
The 10-second timeout covers the HTTP request and response decoding, not Keychain approval. Keychain timeouts return unavailable limits with reason probeFailed. Tests cover approval delayed by 12 seconds and a request that remains stalled. |
Priority: Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
Suggested reviewers: macroscopeapp
Merge Risk: Minimal · up to 7f3e0
-
No actionable merge-blocking risk is established; the change is ready to merge after normal checks.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title clearly and concisely describes the main change: waiting for Keychain approval before applying the usage request timeout. |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
| Description check |
 |
The description is mostly complete but deviates from the template in places. It has a clear Problem (ten-second credential-lookup deadline cuts off the thirty-second Keychain approval window) and Chan… |
Full details: Description check
-
Explanation
The description is mostly complete but deviates from the template in places. It has a clear Problem (ten-second credential-lookup deadline cuts off the thirty-second Keychain approval window) and Change (timeout moved to the HTTP usage request, new Keychain timeout message). Verification is detailed: a twelve-second-approval regression test fails before and passes after, a stalled-request test covers the post-approval timeout, and check:changed plus live macOS checks are reported. Scope cites the CONTRIBUTING obvious-bug exception and gives a reason. Gaps: the Scope section does not link a triaged issue or give the approval comment, and the description does not state the model and harness used. The Problem section lacks explicit reproduction steps beyond the 12-second approval case. The description also cites #24443 and #21228 without explaining why they are relevant. These are non-critical gaps, so the check passes.
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Synced with current main in 698065e and reran vp run check:changed: formatting, lint, both knip checks, five affected package typechecks and all 11 usage-limit tests pass. The description now makes explicit that this corrects deadline ordering; signing-identity and persistent Keychain trust problems are separate. GitHub's upstream CI run remains subject to maintainer approval for the fork.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Oct 26, 2026
Note Written by gpt-6.1-sol on behalf of Maria
Verified in a real dev environment
checked exact head 698065e461cb132160df02c128ef34209fd84d89 on a linux boat vm with repository Playwright and /usr/bin/google-chrome. no source changes or pushes.
- started github/main
6575ce3250 in a separate worktree after vp i; opened usage > limits and refreshed. stopped its captured process group before starting the pr.
- installed and ran the exact pr head with isolated state, server port 13773 and web port 5733. added the real /home/user/main git worktree as a project through the app, selected codex gpt-6.1-sol, and submitted a real provider turn. the completed response was
pr24450 real codex turn ok.
- opened limits and refreshed, then switched to tokens and cost. the latter populated real cli usage history. limits showed the same codex json-rpc -32600 error on main and the pr. cursor is installed but reports
Not logged in; no cursor quota was displayed.
- all 11 existing cursor usage-limit tests passed on blacksmith. those tests simulate keychain timing and do not prove the macos interaction.


short runtime transcript
Not verified
the changed behavior remains unverified. the original bug could not be reproduced on main: the credential path requires macos, a cursor cli login, opt-in keychain usage, and a real keychain approval delayed beyond ten seconds. this linux vm cannot exercise it. no platform spoofing, mock credentials or simulated runtime provider turns were used.
not verified: delayed keychain approval succeeding after ten seconds; the thirty-second keychain timeout message and retry; the real cursor http request/body deadline after approval; authenticated cursor quota success; macos/windows desktop and native ios/android. this needs a macos server with an authenticated cursor account before this fix can be called verified.
startup incident: the first pr launch used the root checkout default ~/.t3 and opened/migrated this disposable vm's live database. i stopped it when the dev-runner path revealed this, then restarted with explicit isolated --home-dir and --no-seed. no agent turns ran against that first server.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks @zaydiscold for tracking down the Keychain deadline mismatch. #32448 (4c3a9d5818) removed Cursor usage’s Keychain lookup, so that approval deadline can no longer block this path. Closing as superseded.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:S
10-29 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|