AI agent is sandboxed, cannot run tests or work with GitHub

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

OS: Windows 10 Pro

AI agent cannot run tests when prompted. When asked to push or fetch something from GitHub, it runs commands but does not get any result. Tried changing Java extension versions as well, as I saw it was an issue before, still nothing. Looks like it is in a sandbox and I can’t find the way to get it out.

I turned on Legacy Terminal Tool, tried to give permission to Run everything and Ask every time in Auto-Run mode, nothing helps.

Steps to Reproduce

Prompt AI agent “run test sample()” or “push project to git branchName”

Expected Behavior

Before an update 2 weeks ago, AI agent was running tests and could work with GitHub

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Version: 2.4.27 (user setup)
VSCode Version: 1.105.1
Commit: 4f2b772756b8f609e1354b3063de282ccbe7a690
Date: 2026-01-31T21:24:58.143Z
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: Windows_NT x64 10.0.19045

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 on Windows in versions 2.4.21 to 2.4.27. A few users ran into the same thing. The agent runs commands, but it doesn’t get any output.

Please check the DevTools console so we can see why:

  1. Open Developer Tools (Help > Toggle Developer Tools)
  2. Run a command via the agent (anything like mvn test or git status)
  3. Copy the logs from the Console and paste them here (look for errors mentioning “path”, “ENOENT”, or “cursor-agent-exec”)

In the meantime, try these workarounds:

Workaround 1: Legacy Terminal Tool

  • Settings > Agent > Legacy Terminal Tool: turn it on
  • Restart Cursor

Workaround 2: Set an explicit shell

  • Settings > Terminal > Integrated > Default Profile: Windows
  • Pick PowerShell (not “null” or “default”)
  • Restart Cursor

Workaround 3: Check PATH
In a normal PowerShell (not inside Cursor), run:

where.exe git
where.exe mvn
$env:PATH

If git or mvn aren’t found, you’ll need to add them to PATH.

In a similar thread, one user temporarily fixed it with a PowerShell profile workaround. If you want, here’s the thread with details: Terminal problems when used by agent. The issue came back though, so it’s not a full fix.

Please share your DevTools logs and we’ll have a better idea what’s breaking.

  1. Legacy tool is on

  2. I don’t have this option Settings > Terminal

  3. Did it, still nothing.

Thanks for the info. About point 2: Settings > Terminal isn’t Cursor Settings, it’s VS Code settings. Try this:

  • Press Ctrl + ,
  • In the search box, type “default profile windows”
  • Find Terminal > Integrated > Default Profile: Windows
  • Select PowerShell (not “null” and not “default”)
  • Restart Cursor

About the DevTools logs: we need the errors that show up when the agent tries to run a command:

  • Go to Help > Toggle Developer Tools
  • In the Console tab, clear logs (right click > Clear console)
  • Ask the agent to run git status or mvn test
  • Copy the logs that include “path”, “ENOENT”, or “cursor-agent-exec”

In another thread, a user had the exact same symptom and the logs showed: ERR_INVALID_ARG_TYPE: The "path" argument must be of type string. Received undefined. If you have the same thing, it’s a known Windows bug in 2.4.21 to 2.4.27.

  • In the search box, type “default profile windows”

  • Find Terminal > Integrated > Default Profile: Windows

  • Select PowerShell (not “null” and not “default”

That helped! Thanks!

1 Like