Agent terminal hangs on every command (even /bin/sh -c 'echo sh-ok') on macOS

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Hey team — I’m seeing a persistent Agent terminal hang that makes terminal tool usage unusable.

Environment
macOS Sequoia 24.6.0
Local workspace (also reproduced in /tmp)
Default shell zsh, but also tested with /bin/sh
Legacy Terminal Tool: enabled
Cursor was fully restarted after config changes
Repro
Ask Agent to run any simple command:

echo ok
pwd
date
/bin/sh -c ‘echo sh-ok’
Expected
Command returns immediately with output.

Actual
Command stays running indefinitely with no output and times out/backgrounds.

Tried already
Restarted Cursor
Enabled Legacy Terminal Tool
Added early-return guards in ~/.zshrc for:
PAGER=head -n 10000 | cat
COMPOSER_NO_INTERACTION=1
CURSOR_AGENT
Removed unconditional ssh-add (left only interactive guarded one)
Updated ~/.zprofile to skip brew shellenv in non-interactive shell
Set workspace terminal settings:
“terminal.integrated.shellIntegration.enabled”: true
“terminal.integrated.commandsToSkipShell”:
“terminal.integrated.sendKeybindingsToShell”: false
default profile forced to /bin/sh
Still no change. Since /bin/sh -c ‘echo sh-ok’ hangs too, this seems unrelated to shell startup config and more like Agent terminal transport/backend not receiving completion/output.

Steps to Reproduce

Open Cursor in any local workspace.
Ask Agent to run:
echo ok
pwd
date
/bin/sh -c ‘echo sh-ok’
Observe command execution state.

Expected Behavior

Command finishes and returns output immediately.

Operating System

MacOS

Version Information

Version: 3.3.30
VSCode Version: 1.105.1
Commit: 3dc559280adc5f931ade8e25c7b85393842acf30
Date: 2026-05-09T18:28:42.332Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 24.6.0

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the detailed report. The troubleshooting you’ve already done is really solid.

This is a known issue on our side. On macOS, the Agent terminal can sometimes hang during the bootstrap phase, so no command ever reaches execution, even /bin/sh -c 'echo sh-ok'. That also explains why changing the shell and cleaning ~/.zshrc doesn’t help. We’re tracking it, but I can’t share an ETA for a fix yet.

Your case is a bit different though because the hang is persistent on every command, not just sometimes. To add this to the report, a few quick questions:

  1. If you turn Legacy Terminal Tool back off, does the behavior change?
  2. If you can catch the hung process, can you run sample <pid> or just ps -ef | grep -E 'cat|zsh' while the command is stuck, then share the output? This will help confirm the hang is exactly where we think it is.
  3. The Request ID for any of the stuck commands via Chat context menu in the top right corner > Copy Request ID.

Once there’s an update on the fix, We’ll reply in the thread.

I have added images running a echo command. I dont know if theres any setting i am missing.
I am using the macbook pro

Hey, thanks. The command shows up in the terminal, but no output comes back. This is the same bug as in the OP. The shell bootstrap hangs before echo gets a chance to run, so the output never appears. We’re tracking the issue, but I can’t share an exact fix date yet.

To add your case to the report, a few questions:

  1. What Cursor version are you on Cursor > About, and what’s your default shell echo $SHELL in the regular system terminal?
  2. Do you have Legacy Terminal Tool enabled in the Agent settings? If yes, try turning it off and also try turning it back on. Sometimes switching helps locally.
  3. While the command is stuck in Agent, open the regular system Terminal.app and run:
    ps -ef | grep -E 'cat|zsh|sh' | grep -v grep
    
    Send the output. This will confirm where exactly the process is blocking.
  4. The Request ID from any stuck run in the chat context menu in the top right corner > Copy Request ID.

Once I have an update, I’ll reply in the thread.