Request: Please help me reset my Cursor settings back to their previous working state, and I’d like a call/screen-share so I can show you the problem live.
Summary My Cursor agent stopped working correctly starting Friday, immediately after I changed some Auto-Run / Agent settings. My teammates on the same team can deploy Salesforce (sf) commands and switch the agent between Plan ↔ Agent modes with no problems. On my machine these actions now fail.
What I changed on Friday (this is when it started) While a deployment was running through the agent, I accidentally clicked around in the Auto-Run settings:
I changed the mode from Allowed (Sandbox) and tried to switch it to Allowlist.
I then tried to change the Legacy mode option.
I also changed the SF Home / “SFHome” option.
After these changes, my Cursor agent broke and has not recovered since.
Symptoms / what’s broken now (only in Cursor, only on my machine)
Salesforce sf deploy/retrieve commands fail through the agent.
Switching the agent between Plan mode and Agent mode (both directions) does not work properly for me, while it works fine for my teammates.
Exact error I am getting
Error: EPERM: operation not permitted, open ‘/Users/shishir.bansal/.sf/sf-2026-06-12.log’
Emitted ‘error’ event on ThreadStream instance at:
at Immediate. (/Users/shishir.bansal/.local/share/sf/client/2.138.6-fab2b4f/node_modules/thread-stream/index.js:369:12)
at process.processImmediate (node:internal/timers:484:21)
Important — this is NOT a sandbox or environment issue
I can deploy successfully from another editor (Windsurf) on the same machine, same Salesforce CLI, same org — so the Salesforce CLI, network, and my org access all work.
The problem is isolated to Cursor, which appears to be broken after my Friday settings change.
What I’ve already tried (no luck)
Reinstalled Cursor
Reinstalled the Salesforce CLI
Reinstalled Node.js
None of these resolved it — strongly suggesting the issue is in my Cursor configuration/settings, not my tooling.
What I need from you
Help me revert / reset my Cursor settings (Auto-Run mode, Legacy mode, SF Home, and any related agent/run-mode config) back to the defaults my team uses, so I match my working teammates.
A call or screen-share at a convenient time so I can demonstrate the exact failure.
Hi Shishir, this is a settings issue, not a broken install.
The error EPERM: operation not permitted ... ~/.sf/sf-*.log is coming from Cursor’s agent sandbox. When Auto-Run is set to Allowed (Sandbox), the agent’s terminal can only write inside your project folder (plus temp directories). The sf CLI writes its log to ~/.sf/ in your home folder, the sandbox blocks that write, and sf crashes with EPERM. Your teammates most likely aren’t on the sandboxed mode, which is why the same commands work for them.
Two ways to fix it:
Option 1 - Match your teammates (quickest). Open Cursor Settings → Agents → Auto-Run and switch from Allowed (Sandbox) to Allowlist (sandbox off). Reopen that page afterward and confirm the Sandbox toggle is actually off - if your earlier switch didn’t save, the sandbox would still be active, which would explain why it’s still failing. (If your team enforces sandbox mode and the option is locked, use Option 2 instead.)
Option 2 - Keep the sandbox, but let sf write. Add a file named sandbox.json inside a .cursor folder at your project root:
{ "additionalReadwritePaths": ["~/.sf"] }
Commit it to the repo and the whole team picks up the same setting automatically. (Alternatively, add your sf command under Cursor Settings → Agents → Auto-Run → Command Allowlist — allowlisted commands run outside the sandbox.)
Two quick notes:
There’s no “SF Home” setting inside Cursor, so nothing to change there on the Cursor side.
The Plan ↔ Agent mode switching should be unrelated to the sandbox. Once sf is working again, if mode switching still misbehaves, reply with what you’re seeing (any error message, and whether a run is stuck part-way) and we’ll take a look.
On the call - we keep support on the thread here so there’s a written record others can find, but I’m glad to keep going back and forth until this is sorted.
The fact that your teammates are fine on the same team points straight at your local settings, not the account or the project. You changed Auto-Run and Agent settings right before it broke, and the Auto-Run command allowlist is the usual culprit, it quietly starts blocking things like sf so the action just does nothing instead of erroring. I would revert that specific setting first, or reset Cursor settings back to default, then re-add changes one at a time. If you can, diff your settings.json against a teammate whose setup works, the one differing key is almost always the thing that did it. It reads like a silent failure because a blocked command returns nothing rather than telling you it was denied.