Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(cursor): enable sandbox in auto mode #10510

Closedwatson(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/10510/headopened View on GitHub

What Changed

Cursor sessions in T3's Auto runtime mode now launch with both --auto-review and --sandbox enabled. This makes T3's mapping match Cursor's native Auto-Review (with Sandbox) mode instead of leaving the Cursor CLI sandbox disabled.

Why

#9283 added --auto-review, but Cursor exposes auto-review and sandboxing as separate CLI options. Without the sandbox flag, routine commands that should run automatically inside the workspace can fall back to allowlist checks and repeatedly prompt for approval.

This preserves Cursor's normal safety boundary: operations that need to run outside the sandbox still emit an ACP permission request for the user.

Evidence

Cursor presents the corresponding native mode as Auto-Review (with Sandbox):

Cursor's native Auto-Review with Sandbox setting

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • UI changes: not applicable
  • Animation/interaction changes: not applicable

Testing

  • ./node_modules/.bin/vp test run apps/server/src/provider/acp/CursorAcpSupport.test.ts — 7 passed
  • ./node_modules/.bin/vp test run apps/server/src/provider/Layers/CursorAdapter.test.ts — 20 passed

Built by gpt-5.6-sol in the Codex harness.

Note

Enable sandbox option for Cursor ACP auto mode

Updates cursorAcpPermissionArgs in CursorAcpSupport.ts so auto runtime-mode launches include both auto-review and the enabled sandbox flag. Full-access and default modes are unchanged. The corresponding test in CursorAcpSupport.test.ts is updated to expect the new sandbox arguments.

Macroscope summarized 6596d75.

Summary by CodeRabbit

  • Bug Fixes
    • Automatic runtime mode now launches with sandbox protection enabled alongside automatic review.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — The change is narrowly scoped and tested, but enabling Cursor’s sandbox changes the execution and permission boundary for the existing Auto runtime mode. Because this is a security-relevant production behavior change, human review is required.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. Review Change Stack

      No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration

      Configuration used: Path: .coderabbit.yaml

      Review profile: CHILL

      Plan: Team

      Run ID: 6a4ec599-a5e3-41a9-90c1-f2cb74f83829

      📥 Commits

      Reviewing files that changed from the base of the PR and between 8b2838e0e8a73d3fa6476940445c372e47b99db4 and 6596d75ad4615953b0a3ddfdb4b4b27f9d913f22.

      📒 Files selected for processing (2)
      • apps/server/src/provider/acp/CursorAcpSupport.test.ts
      • apps/server/src/provider/acp/CursorAcpSupport.ts

      Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


      📝 Walkthrough

      Walkthrough

      Auto runtime mode now passes --sandbox enabled with --auto-review to the Cursor ACP process. The related test verifies the updated arguments and test name.

      Changes

      Cursor ACP runtime arguments

      Layer / File(s)Summary
      Update auto-mode arguments and test
      apps/server/src/provider/acp/CursorAcpSupport.ts, apps/server/src/provider/acp/CursorAcpSupport.test.ts
      Auto mode now returns --auto-review --sandbox enabled. The test expects the updated arguments and identifies the sandbox behavior.

      Estimated code review effort: 1 (Trivial) | ~2 minutes

      Merge Risk: ⚪ Minimal · up to 6596d

      Cursor Auto sessions now start in sandboxed auto-review mode, reducing unnecessary approval prompts while retaining permission requests for actions outside the sandbox. The targeted behavior is covered and no merge-blocking risk remains.

      Suggested reviewers: juliusmarminge, maria-rcks

      🚥 Pre-merge checks | ✅ 4 | ❌ 1

      ❌ Failed checks (1 warning)

      Check nameStatusExplanationResolution
      Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files.Write docstrings for the functions missing them to satisfy the coverage threshold.
      ✅ Passed checks (4 passed)
      Check nameStatusExplanation
      Title check✅ PassedThe title clearly and concisely describes the main change: enabling the sandbox in Cursor auto mode.
      Description check✅ PassedThe description includes the required change and rationale, confirms the PR is focused, addresses UI applicability, and provides test results. It is complete and directly related to the changes.
      Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
      • Fix all pre-merge checks with AI
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests

      Comment `@coderabbitai help` to get the list of available commands.
    4. Thanks for the PR. We're not taking changes to the orchestration and provider layers right now: that part of the server is being rewritten for V2, and merging into the current code would either conflict with or be thrown away by that work.

      Closing for now. If this is still an issue once V2 lands, please reopen (or open a fresh PR against the new code) and we'll take a proper look.

    5. juliusmarminge closed this

Sign in to join this conversation.