From 1f8fb38771afcbdc69a29b8140a3df2714017a08 Mon Sep 17 00:00:00 2001 From: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com> Date: Thu, 24 Sep 2026 21:38:41 -0700 Subject: [PATCH] fix(server): Cursor sandboxed threads find their helper when running from source @cursor/sdk locates its platform package (cursorsandbox, rg, tree-sitter natives) by walking up from the entry script looking for node_modules/@cursor/sdk--. pnpm's isolated layout keeps that optional dependency inside the virtual store next to the SDK, so the walk from apps/server never reaches it and restricted-mode threads fail with "sandboxing is not supported in this environment". Publicly hoisting @cursor/sdk-* links the installed platform package into the root node_modules, which the walk reaches. Co-Authored-By: Claude Opus 5.5 (1M context) --- pnpm-workspace.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 598b81fc9a18..60c11830c893 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -209,6 +209,12 @@ peerDependencyRules: allowedVersions: vite: "*" +# @cursor/sdk finds its platform package (sandbox helper, rg, tree-sitter) by +# walking up from the entry script for node_modules/@cursor/sdk--. +# pnpm keeps optional deps inside the virtual store, so hoist it to the root. +publicHoistPattern: + - "@cursor/sdk-*" + supportedArchitectures: cpu: [current, x64] libc: [current, glibc]