AI Shell Integration ignores default Git Bash profile on Windows and falls back to PowerShell

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

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:

“terminal.integrated.profiles”: {
“Git Bash”: {
“path”: “C:\Program Files\Git\usr\bin\bash.exe”
}
},
“terminal.integrated.defaultProfile.windows”: “Git Bash”,
“terminal.integrated.shell.windows”: “C:\Program Files\Git\usr\bin\bash.exe”

Restart Cursor.

Open an integrated terminal with Ctrl+` → Git Bash opens correctly. :white_check_mark:

Ask the AI chat to run ls or grep. :cross_mark:

Expected Behavior

AI shell integration should respect the configured default terminal profile and execute commands inside Git Bash.

Linux commands should succeed as they do in the normal integrated terminal.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.7.17 (user setup)
VSCode Version: 1.99.3
Commit: 34881053400013f38e2354f1479c88c9067039a0
Date: 2025-09-29T03:10:26.099Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26100

For AI issues: which model did you use?

auto

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

1 Like

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:

  1. Use the regular terminal (Ctrl+`) with Git Bash and copy/paste commands from the AI chat instead of using the shell integration
  2. Try setting your system’s default shell to Git Bash through Windows Terminal settings if you have it installed
  3. 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.

I have this same problem despite having WSL installed and having changed the default terminal setting in Windows Terminal to use Ubuntu.

Same thing. Is there any registry key or something that can be updated?

Same issue here - it’s completely unusable. I have the exact same problem:

  • Git Bash properly configured in settings.json
  • Regular terminal (Ctrl+`) opens Git Bash correctly
  • 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.

Is there any timeline for fixing this issue?

2 Likes

hey! we tried to reproduce, but weren’t able to. can you try installing latest versions and see if it goes away? if not we’ll try to debug it further

1 Like

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`

 "terminal.integrated.shellIntegration.environmentReporting": true,

    "python.terminal.shellIntegration.enabled": true,

    "terminal.integrated.profiles.windows": {

          "Debian (WSL)": {

            "path": "C:\\Windows\\System32\\wsl.exe",

            "args": ["-d", "Debian"],

            "icon": "terminal-linux"

          }

    },

    "terminal.integrated.defaultProfile.windows": "Debian (WSL)",

    "terminal.integrated.automationProfile.windows": {

          "path": "C:\\Windows\\System32\\wsl.exe",

          "args": ["-d", "Debian"]

    },

    "terminal.integrated.useWslProfiles": true,

cursor just ignores it. it should respect the automation setting but doesn’t.

i am on latest release and still broken. I would be HAPPY to help you fix. Not sure how to DM you my contact info.

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.

1 Like

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.

Same, it’s impossible to use Git Bash on Windows with the Agent.

It used to work in the past now it’s been broken for a while.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.