# Agent not exiting out of terminal execution and gets stuck

**URL:** <https://forum.cursor.com/t/agent-not-exiting-out-of-terminal-execution-and-gets-stuck/106486>\
**Category:** Bug Reports\
**Created:** [June 20, 2025, 4:39am UTC](https://forum.cursor.com/t/agent-not-exiting-out-of-terminal-execution-and-gets-stuck/106486 "2025-06-20T04:39:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jake\_Hall](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@Jake\_Hall](https://forum.cursor.com/u/Jake_Hall)\
**Post date:** [June 20, 2025, 4:39am UTC](https://forum.cursor.com/t/agent-not-exiting-out-of-terminal-execution-and-gets-stuck/106486/1 "2025-06-20T04:39:18Z")

</div>

### Describe the Bug

Every now and again when Agent is running CLI command, it get’s stuck and doesn’t proceed to next action. Even if the command has completed successfully. I need to click ‘skip’

Currently facing this issue with opus-4

### Steps to Reproduce

Hard to reproduce as it is intermittent

### Expected Behavior

after CLI command completes, agent should continue with the flow

### Screenshots / Screen Recordings

 ![Screenshot 2025-06-20 at 05.36.57.png](https://us1.discourse-cdn.com/cursor1/original/3X/f/0/f0faf0fd76aeadb342e2d2a8495940ff499bc03e.png)

### Operating System

MacOS

### Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.1.3  
VSCode Version: 1.96.2  
Commit: 979ba33804ac150108481c14e0b5cb970bda3260  
Date: 2025-06-15T06:35:49.230Z  
Electron: 34.5.1  
Chromium: 132.0.6834.210  
Node.js: 20.19.0  
V8: 13.2.152.41-electron.0  
OS: Darwin arm64 24.5.0

### Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

---

<div class="post-metadata">

**Author:** ![Jake\_Hall](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@Jake\_Hall](https://forum.cursor.com/u/Jake_Hall)\
**Post date:** [June 20, 2025, 4:56am UTC](https://forum.cursor.com/t/agent-not-exiting-out-of-terminal-execution-and-gets-stuck/106486/2 "2025-06-20T04:56:25Z")

</div>

It’s very annoying im ngl

---

<div class="post-metadata">

**Author:** ![khiranak](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/khiranak/32/49611_2.png) [@khiranak](https://forum.cursor.com/u/khiranak)\
**Post date:** [June 20, 2025, 10:04am UTC](https://forum.cursor.com/t/agent-not-exiting-out-of-terminal-execution-and-gets-stuck/106486/3 "2025-06-20T10:04:51Z")

</div>

Same here. Been having this issue since I started using Cursor in January.

It’s annoying to have to reinstall Cursor almost daily.

Here’s some more details from me:

# Agent Terminal Commands Get Stuck - Persistent Issue

## ✅ Forum Search Check

Found similar reports but adding my system details and long-term experience with this issue.

## 🐞 Bug Description

The AI agent loses ability to interpret terminal command outputs. Commands execute but agent can’t detect completion, requiring manual “Skip” clicks or terminal pop-out to proceed. Agent can then no longer interpret/read terminal output.

**Symptoms** :

- Commands hang with spinning indicator indefinitely
- Agent can’t read command output even when commands succeed
- Must click “Skip” after every terminal command
- Sometimes a Cursor restart helps, sometimes a complete Cursor reinstall is required to restore functionality

## 📋 Steps to Reproduce

1. Ask agent to run any terminal command (`npm install`, `pytest`)
2. Command executes but agent gets stuck waiting
3. Must manually click “Skip” or pop-out terminal to continue, but agent is not able to read terminal output any longer

**Frequency** : Intermittent but persistent since I started using Cursor, seems to affect all command types.

## 💻 System Information

- **OS** : macOS Sonoma 14.7.4 x86\_64
- **Hardware** : MacBook Pro (16-inch, 2019)
- **CPU** : Intel i9-9980HK (16 cores) @ 2.40 GHz
- **Memory** : 64GB
- **Shell** : zsh 5.9

## 🔧 Workaround

- **Restart Cursor**
- **Reinstall Cursor** (sometimes downgrade) when issue is not solved by restart

## 📊 Impact

**Severity** : High workflow blocker

Please let me know if there’s anything I can share that will help understand and hopefully fix this issue.

---

<div class="post-metadata">

**Author:** ![bobjo-daangn](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/bobjo-daangn/32/66211_2.png) [@bobjo-daangn](https://forum.cursor.com/u/bobjo-daangn)\
**Post date:** [June 25, 2025, 2:59am UTC](https://forum.cursor.com/t/agent-not-exiting-out-of-terminal-execution-and-gets-stuck/106486/4 "2025-06-25T02:59:04Z")

</div>

I am also experiencing the same issue, and it seems to be caused by the zsh theme, Powerlevel10k.

- [Cursor agent mode - when running terminal commands often hangs up the terminal, requiring a click to pop it out in order to continue commands - #49 by arthur-zhuk](https://forum.cursor.com/t/cursor-agent-mode-when-running-terminal-commands-often-hangs-up-the-terminal-requiring-a-click-to-pop-it-out-in-order-to-continue-commands/59969/49)

Therefore, I solved the problem by simply changing the default terminal for the cursor to use bash instead of zsh.

To change the default terminal shell, follow these steps:

1. Open Settings  
Shortcut: Press Cmd + , (on macOS) or Ctrl + , (on Windows/Linux) to open the settings.  
Menu: Alternatively, navigate to File \> Preferences \> Settings.

2. Search for the Terminal Setting  
In the settings search bar, type terminal.integrated.defaultProfile.

3. Change the Default Profile  
Find the entry that matches your operating system (e.g., Terminal › Integrated › Default Profile: Osx, Windows, or Linux).  
Click the dropdown menu and select your desired shell from the list of installed terminals (e.g., zsh, bash, PowerShell, cmd).

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/127254_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [July 25, 2025, 2:59am UTC](https://forum.cursor.com/t/agent-not-exiting-out-of-terminal-execution-and-gets-stuck/106486/5 "2025-07-25T02:59:16Z")

</div>

Closed on July 25, 2025, 2:59am UTC

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