CD Issues - Agent running node scripts

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

My ever growing pain of Cursor not know what folder it is opening a terminal in.

Cosntantly Cursor is using cd command and running the file execution command when it is already inside the correct folder. It VERY CEALRY shows the double folder in the error but it does not read it and assumes the folder does not exist.

It’s extremely repetitive and makes the Cursor terminal completely redundant as it either opens the terminal in the correct location and then tries to cd in the command or it doesnt open in the correct location and doesnt cd - very rarely does it do it correctly.

Primarily runing node scripts and I believe the terminal is Powershell.

Is it a setting problem or is Cursor just overlooking this painful bug?

Steps to Reproduce

Just have cursor run terminal commands in Node i.e. test scripts

Expected Behavior

For it to know what folder it opens the terminal in and run the script successully.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Verison 2.0 - latest version (but existed before 2.0)

For AI issues: which model did you use?

Auto

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey Thanks for the report. This is a known issue with the new terminal implementation on Windows, where the agent sometimes tracks the current working directory incorrectly.

Try this workaround:

  • Open Cursor settings Ctrl+Shift+J
  • Go to Agents tab → Inline Editing & Terminal
  • Enable “Legacy Terminal Tool”
  • Press Ctrl+Shift+P → “Terminal: Kill All Terminals”
  • Fully restart Cursor
  • Test your node scripts again

This should restore correct working directory detection when the agent runs commands.

Let me know if this solves the problem.

1 Like