On Windows, Cursor’s AI Shell Integration (Shell Integration: Rich) always executes commands inside PowerShell, even when Git Bash is explicitly set as the default terminal profile. This causes Linux-style commands (ls, grep, touch, etc.) to fail.
Steps to Reproduce
Install Git for Windows (with Git Bash).
In Cursor settings.json, configure Git Bash as default:
Hey, thanks for the report. This is a known issue where the AI shell integration doesn’t respect the terminal profile settings and defaults to PowerShell on Windows. The shell integration feature currently has some limitations around terminal selection.
A few workarounds you can try:
Use the regular terminal (Ctrl+`) with Git Bash and copy/paste commands from the AI chat instead of using the shell integration
Try setting your system’s default shell to Git Bash through Windows Terminal settings if you have it installed
You could also install WSL which tends to work better with the shell integration
The team is aware of this limitation and it should hopefully get improved in future updates. For now the shell integration works most reliably with the default PowerShell on Windows.
I have the same issue. I have Git bash as default profile, but Cursor chat ignores it and still uses PowerShell. Can this be fixed? Other IDEs like Windsurf don’t have this issue.
AI Shell Integration still uses PowerShell and all bash commands (ls, grep, etc.) fail
Cursor Version: 1.7.44
OS: Windows 10
This is very frustrating because the AI is practically useless for file operations. Please fix this bug quickly - this is basic functionality that should work.
Yeah, I’m using the latest version of Cursor. It’s really annoying, but I found a workaround - by enabling the “Legacy Terminal Tool” in the chat settings, it now opens the default terminal (bash). You guys really should fix this, because I know the issue isn’t just affecting a few people. Opening PowerShell instead of bash on Windows is a disaster - Cursor completely fails to handle commands in PowerShell, and the PowerShell terminal itself is just terrible and unusable.
This used to work fine until Cursor broke it about a month ago. I always get powershell on windows and there is no way to change it.
my settings.json`
I still have the problem so I tried uninstalling and re-installing Cursor and now it’s just in a bad state. I started by uninstalling Cursor (user) and now it’s impossible to uninstall the second one but Cursor is still fully functional on my computer. I am mentioning this because it may provide a clue about the problem at hand.
This problem is alive and well and is 100% reproducible on my computer. I am happy to help debug this if you can’t reproduce it.
Switching to legacy mode works, but then as soon as you do something like change the models that you want to see, it’s back to PowerShell.
This was driving me crazy because I couldn’t figure out why it went back to PowerShell, and then I realized it was because I changed the models available.
Any change you make to the cursor settings, what you have to do is turn legacy mode off, and then do a shell, and then turn it back on again. Once you turn it back on again, then you’ll be able to get your Unix shell rather than PowerShell.
This should really be fixed. This is really annoying.
It’s so bad now that when cursor restarts, it puts you into PowerShell. You actually have to go into settings in every single window and flip the legacy Terminal Tool mode to off and then on again in order to get back a WSL prompt.