Description
I’m experiencing an issue where the Cursor agent fails to execute simple terminal commands, such as running a Python script, despite Python being installed and added to PATH. When I prompt to execute a basic hello_world.py
script through Cursor Composer in Agent mode, I receive a CommandNotFoundException
error.
However, when I open a terminal manually in VS Code, I can run the same commands without any issue. When Cursor tries to execute the same commands, I get the following error message:
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe '-l'" terminated with exit code: 1.
Steps to Reproduce:
- Open Cursor with a clear workspace (Empty directory).
- In Composer Agent mode, prompt Cursor with:
create a hello world python file and call it in terminal
- Cursor creates a
hello_world.py
file with the following content:
print("Hello, World!")
- Observe that Cursor fails to execute the script, showing an error such as
CommandNotFoundException
. And a vscode pop up message with:
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe '-l'" terminated with exit code: 1.
- Open a manual terminal in VS Code and run the same commands agent is failing at:
python hello_world.py
- The script executes successfully, confirming that Python is installed and available in PATH, reachable from the VS Code terminal.
System Information:
- OS: Windows 11 Enterprise (22631.4890)
- Cursor Version: 0.45.11
- VS Code Version: 1.96.2
Attachments:
Screenshot of Cursor failing to run the command and the same command running successfully in VS Code Terminal:
Additional Notes:
This issue prevents me from using one of Cursor’s main features; Agent.