Terminal commands get stuck/hang when running in Cursor Agent mode

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Environment Details

  • Cursor Version: 1.6.42 (Universal)
  • VSCode Version: 1.99.3
  • Commit: 5911e9593196a000b1c00553aaf03b0b32042b90
  • Date: 2025-09-20T17:16:56.346Z
  • Electron: 34.5.8
  • Chromium: 132.0.6834.210
  • Node.js: 20.19.1
  • V8: 13.2.152.41-electron.0
  • OS: Darwin arm64 24.6.0 (macOS)

Problem Description

When running Cursor in Agent mode, any terminal command executed through the agent interface gets stuck and never completes. The commands appear to be sent but never return results, causing the agent to hang indefinitely.

Steps to Reproduce

  1. Open Cursor in Agent mode
  2. Try to execute any terminal command through the agent (e.g., mkdir, git, ls, etc.)
  3. Command gets stuck and never returns

Expected Behavior

Terminal commands should execute normally and return results when run through the Cursor agent interface.

Actual Behavior

Terminal commands hang indefinitely without returning any output or completion status.

Shell Configuration

The issue occurs with the following zsh configuration in .zshrc:

if [[ -n "$CURSOR_AGENT" ]]; then
  ZSH_THEME=""  # Disable Powerlevel10k for Cursor Agent
else
  ZSH_THEME="powerlevel10k/powerlevel10k"
fi
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh

source $ZSH/oh-my-zsh.sh
if [[ -n "$CURSOR_AGENT" ]]; then
  PROMPT='%n@%m:%~%# '
  RPROMPT=''
fi

if [[ -n "$CURSOR_AGENT" ]]; then
  # Skip theme initialization for better compatibility
else
  [[ -r ~/.p10k.zsh ]] && source ~/.p10k.zsh
fi

Additional Context

  • The shell configuration has been specifically modified to handle Cursor Agent mode by:
    • Disabling Powerlevel10k theme when $CURSOR_AGENT is set
    • Setting a simple prompt format
    • Skipping theme initialization
  • The issue persists despite these compatibility measures
  • This affects all terminal operations when using the agent, making it impossible to perform file system operations, git commands, or any other shell-based tasks

Impact

This issue severely limits the functionality of Cursor Agent mode, as it cannot perform basic file operations, git commands, or any other terminal-based tasks that are essential for development workflows.

Workaround

Currently, no workaround is known. The agent mode becomes unusable for any tasks requiring terminal commands.

Steps to Reproduce

Open Cursor in Agent mode
Try to execute any terminal command through the agent (e.g., mkdir, git, ls, etc.)
Command gets stuck and never returns

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Cursor Version: 1.6.42 (Universal)
VSCode Version: 1.99.3
Commit: 5911e9593196a000b1c00553aaf03b0b32042b90
Date: 2025-09-20T17:16:56.346Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0

Does this stop you from using Cursor

Yes - Cursor is unusable

5 Likes

Same is happening to me…..renders Cursor Agent Mode virtually useless.

I also did the .zshrc workaround–didn’t help.

same issue here. Cursor just sits there after attempting to launch a command…

1 Like

Same thing happening to me. Killing productivity big time.

Yep, I have been having the same issue. Really annoying.

I ended up using this workaround. It seems to be working now, if anyone else wants to try.

1 Like

Hey, thanks for the report. The team is working on fixing this bug.

Got the same issue!!! Dev team, please fix this bug :folded_hands:t3:

2 Likes