Cursor shell commands ignore workspace Node version

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Commands run by Cursor don’t use the Node version from the current workspace; they use the computer’s default global version.

This seems to be a very recent regression.

Steps to Reproduce

  • Use NVM
  • Set Node 22 as the default alias
  • Add a .nvmrc with v24.9 at the root of the workspace
  • VS Code uses the correct version
  • Cursor shell commands log 22, so the workflow is completely broken

Expected Behavior

Like VS Code, Cursor commands should use the correct binary for the workspace.

Operating System

MacOS

Version Information

Version: 2.4.22
VSCode Version: 1.105.1
Commit: 618c607a249dd7fd2ffc662c6531143833bebd40
Date: 2026-01-26T22:51:47.692Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin arm64 25.2.0

Additional Information

Please stop breaking commands and the shell tool it’s exhausting. I’ve raised so many issues over the last two weeks, and my team is losing a lot of time trying to figure out what was broken. What’s happening again?

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report. This is a known issue. The agent terminal doesn’t always inherit the environment from nvm or direnv on startup.

A few quick questions:

  • How do you launch Cursor, from a terminal (where nvm is already active) or from the dock or launcher?
  • If you open a regular terminal in Cursor and run nvm use manually, does it work?

For now, here’s a workaround:

  1. Add this to your .zshrc (or .bashrc) to auto-run nvm use when there’s a .nvmrc:

    autoload -U add-zsh-hook
    load-nvmrc() {
      if [[ -f .nvmrc && -r .nvmrc ]]; then
        nvm use
      fi
    }
    add-zsh-hook chpwd load-nvmrc
    load-nvmrc
    
  2. Or add a Cursor Rule: “Always run nvm use before any Node.js or npm commands”

The team is aware of this issue. There’s no exact ETA yet, but your report helps us prioritize it.

I open it from terminal (my default nvm is 22) but the workspace one is 24, why VsCode shell use the correct nvm and not Cursor commands ?