Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(provider-cursor): start default Cursor threads on Windows #20046

Mergedfabiocolor(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/20046/headmerged by juliusmarminge View on GitHub

Windows Cursor Auto and supervised threads fail before their first turn because the SDK does not implement its filesystem sandbox on Windows. The adapter now uses the server platform to omit the default sandbox there while preserving approval behavior and every explicit sandbox policy. Restricted Windows modes without Auto-review continue to request sandboxing and remain unsupported, preserving their access limits. Linux and macOS retain their existing behavior. A session warning explains the Windows limitation.

Continues @fabiocolor’s work in #20046, preserving the contributor commit and merging current main. The takeover replaces the broad platform matrix with the existing policy test and one adapter startup regression.

Verification on head 3736d8fa9f, Node 24.21.0, Linux x64:

  • Cursor adapter suite: 17 passed. The Windows startup regression fails against main with sandboxOptions.enabled === true, then passes with the fix.
  • Targeted lint, provider-cursor typecheck, and server typecheck passed; only existing Effect suggestions remain.
  • Original branch had 18 tests on its older base; the current base has 16 and this head has 17. No UI code changed; the adapter-boundary test is the before/after proof.
  • Native Cursor Windows startup, macOS, iOS, Android, and Electron desktop were not verified in this Linux takeover. The original author reported a separate installed Windows check, which is not verification of this head.

Independent full-diff reviews: round 1 found Windows Auto-accept edits would lose its sandbox with review disabled. Fixed with two assertions in the existing policy test; both failed before the correction. Round 2: Claude Opus 5.5 and GPT-6-Sol reviewed the complete diff independently and reported no blocking findings.

Model and harness: recovered takeover implementation by Claude Fable 5.1 in Claude Code; resumed verification and integration by GPT-6.1-Sol in Codex through T3 Code. Independent reviews by Claude Opus 5.5 and GPT-6-Sol.

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review in Change Stack →

      Warning

      Review limit reached

      Only developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing.

      Next included review available in 6 minutes.

      Check out review usage here.

      View limit details

      Limit details: You’ve used all 10 included reviews currently available.

      Learn how review limits work.

      Review configuration:

      ⚙️ Run configuration
      • Configuration used: Path: .coderabbit.config.ts
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: f36bdd39-30a5-45af-91fd-da346e5623cf
      📥 Commits

      Reviewing files that changed from the base of the PR and between 3abc4e11e232144638d2194e0b8e6bd2e89d126a and bf943b25a43deb472c76df9d157867415f6c3e72.

      📒 Files selected for processing: 4
      • apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts
      • docs/user/cursor.md
      • packages/provider-cursor/src/server/adapter.test.ts
      • packages/provider-cursor/src/server/adapter.ts

      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: 6c81ad77-2727-4f2e-9d37-4c39237f0f5c
      📥 Commits

      Reviewing files that changed from the base of the PR and between 81493efb71e8e8244f95d3e9f71d8369654ab151 and 3abc4e11e232144638d2194e0b8e6bd2e89d126a.

      📒 Files selected for processing: 3
      • apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts
      • packages/provider-cursor/src/server/adapter.test.ts
      • packages/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 adapter now uses the host platform when setting runtime sandbox options. On Windows, it disables the default filesystem sandbox outside Full access and logs a warning once per session when filesystem isolation is unavailable.

      Changes: Windows Cursor sandbox handling

      Layer / File(s)Summary
      Platform-aware runtime policy
      packages/provider-cursor/src/server/adapter.ts, packages/provider-cursor/src/server/adapter.test.ts, apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts
      cursorRuntimeAgentPolicy and makeCursorAgentOptions now take the host platform. Tests cover sandbox and auto-review settings across Windows, Linux, and macOS.
      Windows session opening
      packages/provider-cursor/src/server/adapter.ts, packages/provider-cursor/src/server/adapter.test.ts
      The adapter passes the host platform when opening an agent. On Windows, it logs once per session when no explicit sandbox policy is set and runtime mode is not full-access. Tests cover Windows startup in auto and approval-required modes.

      Priority: ➖ Normal

      Estimated code review effort: 2 (Simple) | ~12 minutes

      Change: Bug fix · Severity of issue fixed: Medium

      Suggested reviewers: juliusmarminge

      Merge Risk: ⚪ Minimal · up to 3abc4

      Windows Cursor sessions can proceed without requesting the default filesystem sandbox while retaining auto-review behavior. No merge-blocking issue was identified.

      Security architecture risk: 🟡 Moderate · up to 3abc4

      Windows Auto and Supervised sessions can now start without filesystem isolation. Approval settings and explicit sandbox requests remain intact, but approval review does not replace filesystem containment. The potential impact extends to files accessible to the account running the agent; the supplied tests do not demonstrate real Windows enforcement.

      Retained concerns

      • Medium · security · inferred: Default Windows non-full-access sessions now proceed without requesting filesystem isolation. The session warning makes the limitation explicit in logs but does not enforce a filesystem boundary. Approval settings remain a separate control, so agent actions induced by hostile instructions may affect files outside the workspace where the host account permits access.
      Security review details

      Security Blast Radius

      • inferred — The changed exposure is local Windows agent execution without an explicit sandbox policy. Without filesystem containment, potential impact is not limited by the configured working directory and can extend to files accessible to the agent's operating-system identity. The inspected evidence does not establish administrator privilege, cross-tenant access, or another service's credentials.

      Security Findings and Attack Paths

      • inferred — The material attack-path concern is hostile instructions influencing a newly runnable, unsandboxed Windows agent to perform filesystem actions outside the intended workspace. The PR removes the default sandbox request for that path; it does not demonstrate malicious execution, approval evasion, or successful access to any particular file.

      Trust Boundaries and Controls

      • observed — For newly constructed options, explicit restrictive or unrecognized sandbox policies still request sandboxing; only dangerFullAccess explicitly disables it. Approval mapping remains independent, and retries remain enabled. The new adapter-boundary tests verify Windows Auto and approval-required option forwarding using a substituted runner, not native enforcement or rejection.

      Resilience and Maintainability Implications

      • observed — Session reuse does not compare explicit sandbox or approval policies, and transition state omits those fields. However, the inspected default production resolvers supply neither field; the located override use is in the replay harness. A production path that tightens explicit policy on an already-open Windows agent remains unestablished, rather than a verified new bypass.

      Hardening Proposals

      • proposed — Expose the lack of Windows filesystem isolation in the user-visible session state or startup acknowledgment, rather than relying solely on a server warning. Keep approval review and filesystem containment visibly distinct.
      • proposed — Before supporting mutable explicit policies on live sessions, bind reuse to effective policy or recreate the native agent when authority tightens. Validate native Windows create/resume rejection and prewarm failure/interruption behavior in addition to option-forwarding tests.
      Pre-merge checks: Passed 4
      Check nameStatusExplanation
      Linked Issues checkPassedIssue [#15901] requires Windows Cursor Auto and Supervised runs to start without filesystem sandboxing while preserving approval behavior, including delegated Cursor work. The adapter now uses HostPro…
      Out of Scope Changes checkPassedThe changes stay within issue [#15901]. The adapter policy and session logging implement the Windows platform behavior. The transcript testkit forwards the same host platform. The added tests support …
      Title checkPassedThe title is concise, specific, and accurately describes the main change: enabling default Cursor threads to start on Windows.
      Description checkPassedThe description explains the Windows failure, the platform-specific fix, preserved behavior, scope, and detailed verification results. It does not use the template headings or provide a direct approva…
      Full details: Linked Issues check

      Explanation

      Issue [#15901] requires Windows Cursor Auto and Supervised runs to start without filesystem sandboxing while preserving approval behavior, including delegated Cursor work. The adapter now uses HostProcess.Platform. Its default Windows policy disables the sandbox for non-Full-access modes. Its autoReview mapping remains mode- and approval-policy-based. Explicit restrictive sandbox policies remain enabled. Tests cover Windows Auto/Supervised adapter-boundary creation, platform and mode combinations, explicit policies, approval overrides, and retries.

      Full details: Out of Scope Changes check

      Explanation

      The changes stay within issue [#15901]. The adapter policy and session logging implement the Windows platform behavior. The transcript testkit forwards the same host platform. The added tests support the policy change. No unrelated product behavior, Linux/macOS retry, Auto-review remapping, or SQLite checkpoint fix is included.

      Full details: Description check

      Explanation

      The description explains the Windows failure, the platform-specific fix, preserved behavior, scope, and detailed verification results. It does not use the template headings or provide a direct approval reference, but the required information is mostly present.

      ✨ 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.
    3. juliusmarminge assignedjuliusmarminge

    4. Taking over this one. I'll reduce the tests to the useful coverage, rebuild the implementation against current main, and verify it before publishing the changes.

    5. juliusmarminge merged this19e06dc

    6. juliusmarminge closed this

Sign in to join this conversation.