Agent running commands is broken

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

With each command execution by the agent, it works but with this powershell error at bottom. This came in 2.4

Steps to Reproduce

Just let agent run any command

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Version: 2.4.23 (system setup)
VSCode Version: 1.105.1
Commit: 379934e04d2b3290cf7aefa14560f942e4212920
Date: 2026-01-29T21:24:23.350Z
Build Type: Stable
Release Track: Early Access
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @haris-musa !

Thanks for reporting. There might be a bug here – but I think this is being triggered by multiple environment variables with the same name (but different case).

If you run Get-ChildItem Env: | Sort-Object Name outside of Cursor, is it successful?

That command is running outside cursor totally fine; it is also running fine inside user opened terminal in Cursor, but not in agent’s terminal

I actually just fixed this with help of agent

  1. I enabled developer mode in windows 11 settings
  2. There was some fnm symlink issue which I fixed
  3. I installed powershell 7 (this is probably what fixed it)

This appears to be fine now, although powershell 7 seems a bit slow with agent idk why and I use node with fnm via symlink which isn’t working in agent’s sandboxed terminal, it has to request for required_permissions: [‘all’]

1 Like