CLI agent prepends bundled Node onto PATH

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

Agent shells prepend the CLI runtime dir (~/.local/share/cursor-agent/versions/<build>/) to PATH. That directory contains Cursor’s bundled node, so it wins over whatever Node is installed locally or pinned by the project.

Same PATH-prepend class as 161653 (marked rolled out for IDE/cursor-server). Still happens for the CLI runtime.

Steps to Reproduce

  1. Install/pin a project Node that is not Cursor’s bundled version.
  2. In a normal terminal, which node / node -v show that install.
  3. In an Agent/CLI tool shell:
   1 │which -a node
   2 │node -v

First hit is ~/.local/share/cursor-agent/versions/2026.08.11-e8db854/node (here: v24.5.0), not the project Node.

Expected Behavior

Bundled Node is only for running the agent. Project commands should resolve node the same way an interactive terminal does.

Screenshots / Screen Recordings

Screenshot 2026-08-19 at 14.04.15.png

Operating System

MacOS

Version Information

cursor-agent 2026.08.11-e8db854
bundled Node v24.5.0
locally installed Node v24.18.0
macOS 26.6 (Tahoe)

Additional Information

IDE Agent tool shells inherit this PATH too; the binary is the CLI install, not cursor-server. Related: 162819.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @mikael_ham! Thanks for reporting this.

There is a real issue here (it’s weird that the node install from the agent ends up in the PATH). I’ll flag that for the team.

In the meantime, could you try adding this to your local .zshrc file?

export PATH="$HOME/.local/share/mise/shims:$PATH"

CLI agent shells are zsh -ilc, so they source ~/.zshrc. With a new CLI agent shell, which -a node should now list the mise shim first, and node -v should be your v24.18.0. The cursor-agent/versions/.../node line can still appear, just not first.