Agent command execution uses WSL instead of the Windows default integrated terminal (Git Bash)

Thanks for the detailed log of your attempts, it really helps. I can see the screenshot and the agent’s PATH is /usr/local/sbin:/usr/local/bin:/usr/sbin:..., which is a pure Linux layout with zero Windows paths. That means the agent process is actually running inside a WSL distro, not just launching bash.exe and looking outside. So your settings.json edits won’t affect this. The issue is which bash.exe gets resolved from PATH when the agent calls it.

Send me the output of these commands from regular CMD Win+R then type cmd, not Git Bash and not PowerShell:

where bash
echo %PATH%

I’m pretty sure the first line of where bash will be C:\Windows\System32\bash.exe. That’s the WSL launcher, and the agent is picking that up.

If that’s the case, there are two options:

Option A I recommend trying this first. Change the order in the System PATH not the User PATH so that C:\Program Files\Git\bin or C:\Program Files\Git\cmd comes before C:\Windows\System32. Open sysdm.cpl then Advanced then Environment Variables then in System variables find Path then Edit then move Git to the top. Reboot after.

Option B if A doesn’t work. Temporarily disable the Windows feature Windows Subsystem for Linux via optionalfeatures.exe, reboot. After that C:\Windows\System32\bash.exe will be gone, and the agent will be forced to use Git Bash. If that helps, it confirms the diagnosis. Then you can enable WSL again and keep PATH in the right order.

After each step, fully quit Cursor not Reload Window, then run the same probe again.