fix(server): Cursor threads in Auto use Cursor's Auto-review#19712
Problem
Cursor threads in Auto run with Cursor's sandbox on but autoReview: false. Any command that has to leave the sandbox (a write outside the workspace, network access) is denied straight away with "Local SDK runs cannot request interactive approval for this shell command", without being reviewed. Permission modes says Auto uses the provider's automatic review on Cursor, so the only way to get those commands through today is Full access.
Closes #19711
Change
cursorRuntimeAgentPolicy now enables autoReview for auto as well as approval-required. Cursor doesn't declare supportedRuntimeModes, so auto reaches the adapter unchanged, and the old check only matched approval-required. With autoReview: true, @cursor/sdk 1.0.35 turns on its Auto-review classifier (getSmartModeClassifierAutoModeEnabled: () => autoReview === true), so escalations are reviewed before anything falls through to the SDK's deny-all decision provider.
Full access, Auto-accept edits, Supervised, and explicit approvalPolicy overrides behave as before.
Scope and approval
Bug report: #19711 (not triaged yet). This is meant as a small, focused fix for an obvious bug: one condition in the Cursor adapter plus the missing auto case in its policy test. It makes Cursor do what the permission-modes guide already documents for Auto, and doesn't touch other providers or modes.
The issue also mentions that Supervised gets autoReview: true, which is the same question #19293 raised for Muse. That's a separate behavior decision, so this PR leaves it alone.
Verification
Reproduced on t3 v0.0.46-nightly.20261014.3132 (macOS 27.0.1, Apple Silicon): in a Cursor thread in Auto,
touch ~/.t3-sandbox-probefailed withOperation not permitted. The retry withrequired_permissions: ["all"]was rejected with the message above. After switching the thread to Full access, the same command succeeded.Added an
autocase to "maps runtime modes to the SDK sandbox and auto-review controls" inpackages/provider-cursor/src/server/adapter.test.ts. Without the fix it fails (expected { autoReview: false, … } to deeply equal { autoReview: true, … }). With the fix,vp test run packages/provider-cursor/src/server/adapter.test.tspasses 13 of 13.vpr typecheckinpackages/provider-cursor,vp lint, andvp fmt --checkon the changed files are clean.Live check on this branch (
vp run dev, macOS, Cursor thread in Auto):curl -sI https://example.comfailed inside the sandbox on DNS lookup. The retry with network access was approved by Cursor's Auto-review without a prompt and returnedHTTP/2 200. Before the fix, Auto escalations got the fixed "cannot request interactive approval" denial instead (thetouchreproduction above).- A request worded as a sandbox escape test was declined by the classifier itself ("Network breakout and escape testing outside sandbox controls require user confirmation") rather than by the SDK's fixed denial. That confirms escalations now reach the reviewer, which still declines what it judges risky.
The Auto thread on the dev build, and the branch it ran from:
Dev build's branch panel showing cursor-auto-mode-auto-review with +11 −1 changes
Claude Opus 5.5 via Cursor in T3 Code
Checks
Added 1 commit
- fix(server): Cursor threads in Auto use Cursor's Auto-review5e97378
Approvability
Verdict: Approved at 5e97378
Macroscope's review found this PR approvable — This is a one-line Cursor adapter bug fix that enables the provider's Auto-review only for explicitly selected Auto threads, with existing modes and overrides unchanged. The accompanying unit test covers the new mapping, and product defaults are not modified.
You can add or adjust custom eligibility rules. Learn more.
Important
Review skipped
Review was skipped as selected files did not have any reviewable changes.
⚙️ Run configuration
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
accabd6c-c224-4858-8b36-7f55418c4998
📥 Commits
Reviewing files that changed from the base of the PR and between 5e97378b4666d9d8139da90d503394cc6e184439 and 7d90d2643df379d9925748cdea7c681338b58113.
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:
- 🔍 Trigger review
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
c64750a3-6e2b-4997-acec-35fb5aca8a90
📥 Commits
Reviewing files that changed from the base of the PR and between ec1313c8f8333292506f05a355bb72d308a455d8 and 5e97378b4666d9d8139da90d503394cc6e184439.
📒 Files selected for processing: 2
packages/provider-cursor/src/server/adapter.test.tspackages/provider-cursor/src/server/adapter.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
The Cursor runtime policy now enables auto-review in Auto mode when no explicit approval policy is supplied. A test checks that Auto mode enables both auto-review and sandboxing.
Changes: Cursor Auto-review Policy
Layer / File(s) Summary Enable Auto-mode review
packages/provider-cursor/src/server/adapter.ts,packages/provider-cursor/src/server/adapter.test.tsWhen no approval policy is supplied, Auto mode now enables auto-review. The test asserts that Auto mode enables auto-review and sandboxing. Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers:
juliusmarminge
Merge Risk: ⚪ Minimal · up to 5e973
Auto mode requests sandboxed execution with Auto-review, and available evidence supports the intended behavior. No actionable merge-blocking risk is established.
Architecture risk: 🔵 Low · up to 5e973
The change affects 1 system.
Changed systems: packages/provider-cursor
Architecture concerns No architecture-level concerns identified.
Review details
Systems and components
- observed — packages/provider-cursor (library) was modified; 2 changed files map to changed impact.
Before / after behavior
- observed — Modified behavior in packages/provider-cursor/src/server/adapter.test.ts: Added an assertion for the
"auto"runtime mode, expecting auto-review and sandboxing to both be enabled. - observed — Modified behavior in packages/provider-cursor/src/server/adapter.ts: When
approvalPolicyis undefined,autoReviewis now enabled for runtime modes"approval-required"or"auto"; previously, only"approval-required"enabled it.
Pre-merge checks: Passed 4
Passed Passed checks: 4 passed
Check name Status Explanation Linked Issues check Passed Issue #19711requires Cursor Auto sandbox escalations to reach Cursor Auto-review.cursorRuntimeAgentPolicynow setsautoReview: truewhenruntimeModeis"auto"and no explicit `approvalPolicy…Out of Scope Changes check Passed The changes stay within issue #19711. The pull request changes one Cursor policy condition and adds the matching Auto policy test. No other provider, runtime mode, or unrelated behavior changes are sh…Description check Passed The description includes Problem, Change, Scope and approval, and Verification sections. It explains the bug, the focused fix, scope boundaries, test results, manual verification, and the unverified i… Title check Passed The title is concise, uses conventional commit syntax, and clearly identifies the main change: enabling Cursor Auto-review for Cursor threads in Auto mode.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Added 1 commit
- Merge branch 'main' into cursor-auto-mode-auto-review7d90d26