# IDE bug. Agent is waiting sandbox response?

**URL:** <https://forum.cursor.com/t/ide-bug-agent-is-waiting-sandbox-response/158675>\
**Category:** Bug Reports\
**Tags:** terminal, sandbox\
**Created:** [April 22, 2026, 6:11am UTC](https://forum.cursor.com/t/ide-bug-agent-is-waiting-sandbox-response/158675 "2026-04-22T06:11:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhaoxi2000](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/zhaoxi2000/32/19921_2.png) [@zhaoxi2000](https://forum.cursor.com/u/zhaoxi2000)\
**Post date:** [April 22, 2026, 6:11am UTC](https://forum.cursor.com/t/ide-bug-agent-is-waiting-sandbox-response/158675/1 "2026-04-22T06:11:45Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

lsof -ti:8080 | xargs kill -9 2\>/dev/null; lsof -ti:3000 | xargs kill -9 2\>/dev/null; echo “ports freed”  
Agent is waiting for a command to finish.

### Steps to Reproduce

Let agent kills the local server both frontend and backend.

### Expected Behavior

Kill and receive immediately.  
Do not waste my too many requests / quota!

### Operating System

MacOS

### Version Information

Version: 3.1.17  
VSCode Version: 1.105.1  
Commit: fce1e9ab7844f9ea35793da01e634aa7e50bce90  
Date: 2026-04-19T19:33:58.189Z  
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 25.4.0

### For AI issues: which model did you use?

Opus 4.6 - non thinking

### Does this stop you from using Cursor

Yes - Cursor is unusable

---

<div class="post-metadata">

**Author:** ![mohitjain](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/mohitjain/32/100229_2.png) [@mohitjain](https://forum.cursor.com/u/mohitjain)\
**Post date:** [April 22, 2026, 10:22am UTC](https://forum.cursor.com/t/ide-bug-agent-is-waiting-sandbox-response/158675/7 "2026-04-22T10:22:37Z")

</div>

Hi @zhaoxi2000,

This is a known issue with the agent’s terminal command completion detection. When commands kill processes (like `lsof | xargs kill -9`), the killed processes can hold file descriptors that delay the signal the agent relies on to know the command finished. The agent then gets stuck waiting even though the command already completed.

A couple of things you can try:

1. **Cancel and continue** – if the agent gets stuck waiting, click Cancel. The agent should proceed immediately with the output that was already returned

2. **Run port-killing commands in a separate terminal** – rather than having the agent run `lsof | xargs kill -9`, run those commands yourself in a regular terminal and let the agent focus on code tasks

Our team is aware of this issue. You may also find this [related thread](https://forum.cursor.com/t/backgrounded-terminal-hangs-in-ide/156990) helpful, where other users have reported the same class of issue with detailed analysis.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [May 28, 2026, 2:16pm UTC](https://forum.cursor.com/t/ide-bug-agent-is-waiting-sandbox-response/158675/13 "2026-05-28T14:16:11Z")

</div>

Closed on May 28, 2026, 2:16pm UTC

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