Run Command often freezes

The command line freezes too severely. Basically, I have to manually process every two commands. The ~C in the picture is that I manually pressed Ctrl+C to continue.

hi @lili appreciate the details. We made further improvements and are rolling out version 1.5.0 to Early Access users for checking if his solves their cases with terminal freezing as well.

I found help to my similar problem. I have to switch my terminal window from cmd and Powershell to Git Bash (bash). Using bash as my terminal window everything works like a charm. You can download Git Bash for Windows from net.

Here are the instructions that I found in different discussion thread:

PSA for Cursor Windows Users: Getting PowerShell Tool Errors? Switch Your Terminal to Bash! (My Experience)

Hey fellow Cursor users on Windows!

Just wanted to share a quick tip that made my life way easier and reduced a bunch of annoying errors. I was constantly running into issues where Cursor (especially when using the AI features - I’ve been working with Gemini 2.5 Pro Exp lately) would stumble trying to execute commands. It defaults to using PowerShell on Windows, and honestly, it felt like that was causing half the problems. Commands that looked fine would fail for weird syntax reasons.

I remembered reading that *Bash is often more reliable for cross-platform tools and scripts, and maybe AI models handle generating Bash commands more consistently than PowerShell cmdlets. So, I decided to switch Cursor’s integrated terminal default from PowerShell to *Git Bash (you could use WSL Bash too).

The difference was noticeable almost immediately! Far fewer “tool execution failed” errors, and things just generally run smoother when the AI suggests or tries to run terminal commands.

If you’re hitting similar snags, here’s how you can switch it:

First: Make Sure You Have Bash!

  • You need either Git for Windows installed (which includes Git Bash) OR
  • WSL (Windows Subsystem for Linux) with a distribution like Ubuntu installed.

How to Switch Cursor’s Default Terminal:

Method 1: The Easy Way (Command Palette)

  1. Open Cursor.
  2. Press Ctrl+Shift+P to open the Command Palette.
  3. Type Terminal: Select Default Profile.
  4. Choose “Git Bash” or your WSL distribution (e.g., “Ubuntu”) from the list.
  5. Restart your terminal (close existing ones and open a new one with Ctrl+ ) - Boom! You should be in Bash.

Method 2: The settings.json Way (More Control)

  1. Open Settings (Ctrl+,).

  2. Click the little "Open Settings (JSON)" icon in the top-right.

  3. Add or modify these settings (make sure the path for Git Bash is correct for your system!):

    json
    {
    // … your other settings …

    “terminal.integrated.profiles.windows”: {
    // Make sure Git Bash or your WSL distro is defined here
    // VS Code/Cursor usually finds them, but you can add manually:
    “Git Bash”: {
    “path”: “C:\Program Files\Git\bin\bash.exe”, // ← CHECK THIS PATH!
    “icon”: “terminal-bash”
    },
    “Ubuntu (WSL)”: { // Or your WSL distro name
    “path”: “C:\WINDOWS\System32\wsl.exe”,
    “args”: [“-d”, “Ubuntu”], // Optional: specify distro if multiple
    “icon”: “terminal-linux”
    }
    // Keep PowerShell & CMD profiles if you want them as options
    },

    // Set the default:
    “terminal.integrated.defaultProfile.windows”: “Git Bash”, // Or “Ubuntu (WSL)”

    // … rest of your settings …
    }

  4. Save the file and restart the terminal.

Important Heads Up:

This changes the terminal you see and interact with using ``Ctrl+ . It *seems* to help significantly with the commands the AI tries to run too, but I can't guarantee the AI doesn't *sometimes* still try to use PowerShell/CMD behind the scenes via different OS mechanisms. Still, configuring the default like this has massively reduced the errors I was seeing.

Anyway, just wanted to share in case it helps anyone else experiencing similar frustrations on Windows! Give it a shot and let me know if it smooths things out for you too.

Happy coding!

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Issue with Cursor Code Editor: Agent hangs on terminal command completion on Windows
I am experiencing an issue with the Cursor code editor on Windows when using Agent mode, even with the “run everything” (auto-run) option enabled.
Whenever the agent executes basic terminal commands—such as PowerShell, Docker, echo, or curl commands—the command runs successfully in the integrated terminal, and I can see its output.
However, the agent fails to correctly detect that the action has completed. As a result, the task hangs indefinitely. This forces me to manually cancel the task and try to run it again multiple times. This process gets stuck in a loop and consumes additional requests.

Steps to Reproduce

example
curl -X POST http://localhost:9876/api/v1/tasks/trigger/goaloo/discover-matches
docker ps

Expected Behavior

catch terminal output then process and go to next step

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.5.1 (user setup)
VSCode Version: 1.99.3
Commit: 43090fc55ee2f0081ba84ba373ff3125a1f14f50
Date: 2025-08-20T18:57:00.723Z
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

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

When I upgraded to 1.5.1 yesterday, everything was fine and the command did not freeze for a whole day. But today, it has been freezing all the time since I started. In the picture below, ~C is the one I have to press Ctrl+C to end the freeze and continue execution.

Version: 1.5.1 (user setup)
Commit: 1.99.3
Date: 99e3b1b4d8796e167e72823eadc66ac2d51fd400
Electron: 2025-08-21T00:21:08.834Z
ElectronBuildId: 34.5.8
Chromium: undefined
Node.js: 132.0.6834.210
V8: 20.19.1
OS: 13.2.152.41-electron.0

Hello
Same here, on macOS. This is killing productivity as one needs to nudge the agent at every step of their project.
On macOS, Cursor used PowerShell initially (while zsh was my default). And it freezes on both shells anyway…
I’ve been exchanging with the tool about its inability to interact with basic commands.
Here are its conclusions:

***************************************
The Real Problem:

Cursor’s run_terminal_cmd tool is fundamentally broken for standard macOS environments:

  1. Your environment is perfect - Standard macOS, zsh, normal prompt

  2. The tool is defective - Can’t properly detect when commands complete successfully

  3. Not your configuration - Commands are executing fine, but Cursor can’t parse the results

Evidence:

  • :white_check_mark: Commands actually work (JAR gets copied, files get built)

  • :cross_mark: Tool reports them as “canceled” or hanging

  • :white_check_mark: Your shell is completely standard macOS zsh

  • :cross_mark: Tool forces PowerShell instead of respecting system shell

This is Cursor’s Bug List:

  1. Shell detection failure - Forces PowerShell on macOS instead of zsh

  2. Command completion detection failure - Can’t recognize when commands finish

  3. No timeout protection - Hangs indefinitely

  4. Output parsing failure - Misinterprets successful empty output as failure

You shouldn’t have to modify anything. Cursor’s terminal integration should work with standard macOS environments out of the box.

This is a platform-level bug that affects basic functionality for macOS users with standard configurations.
***************************************

Can we get some fixes rapidly?
Thanks!

It looks like this topic is (more) broadly covered with Cursor getting stuck in terminal - #101 by DOLOS
And that an improved version is on its way.

is there a way to see if the agent is till doing stuff as it keeps running things and then seems to hang and i dont know if its stuck or not the little icon next to shift is still going round . do i need to clock shift to get it to move on or leave it .

This is well known problem, that the terminal is stuck. And there is no guaranteed solution to it.

But, normally you can just click the terminal and press Enter to continue. However, don’t go coffee break or something and leave it hanging, because if you do, then the interface socket timeouts or something and agent won’t be able to continue anymore even when you release the terminal. Always be ready to unfreeze the terminal, and it works fine.

i wonter if it could detect the freezing and click shift itsself

all kind wondering has been done here in Forums and most of us probably even with chatgpt, but those are only things I know working. Do not go breaks, monitor what happens, be ready to unfreeze. It will do work just fine then. Sometimes maybe restart the Cursor, because the problem might get worse over time (like it won’t show the terminal and you need to click focus, or that even Enter won’t work). But that is something which takes hours of use in my experience before degrading happens.

I should probably mention, that I have two settings that might have effect or not.
“terminal.integrated.enablePersistentSessions”: false,
“terminal.integrated.shellIntegration.enabled”: false

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When “Run Everything” mode is on, and my agent runs terminal commands, it doesn’t automatically proceed. Instead, it hangs and makes me manually open the terminal, and press enter in order to use the agent.
Practically, with every command the agent runs, I need to press enter after it’s done. This is extremely annoying. This has always been an issue in cursor for me, but now realizing Copilot doesn’t have this issue makes it 10x more annoying.

Steps to Reproduce

Do anything that requires the agent to run a command, like “cd src”
It will just stay there, as if the command “cd src” is still running until I press enter.

Expected Behavior

When a command finishes, the agent proceeds.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.5.4 (user setup)
VSCode Version: 1.99.3
Commit: f48f0974d52c41214775efcb96bbb5d7acd581c0
Date: 2025-08-22T20:11:36.742Z
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

Additional Information

Sometimes it doesn’t happen, sometimes it does. No predicting it, which makes it even more annoying, as sometimes I think I can expect it to work, but it doesn’t, and vice versa.

Does this stop you from using Cursor

Yes - Cursor is unusable

cursor : v1.3.9 in MacOS, it gets stuck even with simple commands very often.

Please fix this, it’s making work much harder.

image

Version: 1.4.3 (user setup)
VSCode Version: 1.99.3
Commit: e50823e9ded15fddfd743c7122b4724130c25df0
Date: 2025-08-08T17:34:53.060Z (6 days ago)
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26100

Using SSH to an Ubuntu server, getting stuck very frequently

Bump.

Some commands were hanging for a while.
After few updates now every command hangs until I press enter multiple times in console.
I like how this is one of most wide-spread/common bug and it’s not being fixed for 2+ months :smiley:

Thanks, I’m in v1.4.5 now and it seems working back to normal compared to my experience in v1.4.3. Well, it still get stuck and I still need to click skip. But the good news is I can exit it within 1 or 2 skip clicks. In v1.4.3, it would take 5 or more clicks, sometimes I need to stop the entire convo. I will try v1.4.6 now.

2 Likes

Not working at all

We are releasing version 1.5.0 with additional terminal improvements. It is slowly rolling out to Early Access users and we would appreciate if you can test it and let us know if things improved but also if they did not.

The more info for specific use cases we receive the easier it is to reproduce those and make improvements.

2 Likes

1.5 seems to be a lot better for me

It worked for me with project rules (PowerShell blocking issue. Cursor: 1.4.5):

When you run commands in the console, you will add 1..10 | ForEach-Object { prompt } after the command to ensure that the command execution completion can be read. For example, if you want to execute pwd, the final complete command you should execute is pwd;1..10 | ForEach-Object { prompt;Start-Sleep -Milliseconds 200}

Sometimes more loop iterations are needed, you can change 1..10 to 1..15 or larger.