ELECTRON_RUN_AS_NODE issue is back in IDE

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Same issue MAJOR ISSUE: Agent terminal set "ELECTRON_RUN_AS_NODE"

but a little bit more random

Cursor sets ELECTRON_RUN_AS_NODE, which makes Cypress start as Node instead of Electron.

Steps to Reproduce

Ask agent to run some script and some times ELECTRON_RUN_AS_NODE is true

Expected Behavior

Cursor agent terminal env should not set ELECTRON_RUN_AS_NODE

Operating System

MacOS

Version Information

Version: 3.18.25
VS Code Extension API: 1.128.0
Commit: 280eca2911f1774689696e5f1efa5a4f97a87af0
Date: 2026-08-31T23:08:02.261Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.291
OS: Darwin arm64 25.5.0

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report. It’s frustrating that this popped up again.

Help me narrow down where the variable is coming from. Next time you can reproduce it:

  1. In the same agent session, ask the agent to run: echo "ELECTRON_RUN_AS_NODE=$ELECTRON_RUN_AS_NODE"
  2. Open a regular terminal in Cursor via Terminal > New Terminal and run the same command there.
  3. Note whether the agent command ran in the sandbox or not. You can see it in the chat on the command block when it runs in the sandbox.
  4. Fully quit Cursor and reopen it from Finder or Dock, not via cursor from a terminal, then repeat steps 1 and 2.

Reply with what each step printed, plus how Cursor was launched in that session, Dock, the cursor command from a terminal, or right after an auto update. This will show which path is setting the variable.

For now, the workaround is to add unset ELECTRON_RUN_AS_NODE at the top of ~/.zshrc so Cypress works, or prefix the command with: env -u ELECTRON_RUN_AS_NODE npx cypress run

Terminal: not set

I use agent without sandbox ( global setting).

New chat is necessary to fix the issue, or i need to ask the agent to unset the problematic env

Thanks, that really narrows it down. If the variable isn’t present in the integrated terminal and only shows up in the agent commands and stays until you start a new chat, then it’s clearly coming from the agent shell environment, not from how the app is launched.

One thing that’ll help us finish this off. You’re running the agent without sandbox globally. If you temporarily enable sandbox for a single command, does ELECTRON_RUN_AS_NODE still leak through, or does it disappear? That’ll tell us if this is tied to the unsandboxed path.

For now, the workaround stays the same, either unset ELECTRON_RUN_AS_NODE at the start of ~/.zshrc, or use a prefix like:

env -u ELECTRON_RUN_AS_NODE npx cypress run

I’ve passed this to the team. I’ll reply here when there’s an update.

@deanrie i encountered again the issue there is for sure a regression recently

Version: 3.18.25
VS Code Extension API: 1.128.0
Commit: 280eca2911f1774689696e5f1efa5a4f97a87af0
Date: 2026-08-31T23:08:02.261Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.291
OS: Darwin arm64 25.5.0

i upgraded cursor this morning

Hey Antoine! Sorry about this! I’ve currently opted you out of a change that I believe caused this issue. Can you restart Cursor and let me know if this still happens?

@Kevin_Nguyen opted out of what i don’t understand

We were rolling out changes to our client side infrastructure that touched agent shell spawn which caused the regression. The changes are behind a feature gate that we were able to roll back. Restarting your client should fix the issue by picking up the updated gate state. Please let me know if it doesn’t!

Thanks for all details, i’ll keep you updated