# Agent Shell fails in Agents Window but succeeds in IDE mode on Windows

**URL:** <https://forum.cursor.com/t/agent-shell-fails-in-agents-window-but-succeeds-in-ide-mode-on-windows/165997>\
**Category:** Bug Reports\
**Tags:** terminal, agents-window, windows\
**Created:** [July 17, 2026, 8:55am UTC](https://forum.cursor.com/t/agent-shell-fails-in-agents-window-but-succeeds-in-ide-mode-on-windows/165997 "2026-07-17T08:55:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aftnoon](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@aftnoon](https://forum.cursor.com/u/aftnoon)\
**Post date:** [July 17, 2026, 8:55am UTC](https://forum.cursor.com/t/agent-shell-fails-in-agents-window-but-succeeds-in-ide-mode-on-windows/165997/1 "2026-07-17T08:55:24Z")

</div>

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

Cursor IDE

### Describe the Bug

Agent Shell fails in Agents Window but succeeds in IDE mode on Windows

### Steps to Reproduce

In the Agents Window, running:  
cmd /c echo ok  
returns:

The shell command returned no exit status  
The same command succeeds in IDE mode with exit code 0 and outputs ok.

Reloading the window, restarting cursor, and creating a new chat do not resolve the issue in the Agents Window.

### Operating System

Windows 10/11

### Version Information

Environment  
Cursor 3.12.17  
Commit: 0fb762053c34788bb7760d5673f8a6d4c8589d50  
Windows 10.0.26200 x64

### Does this stop you from using Cursor

No - Cursor works, but with this issue

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [July 17, 2026, 9:29am UTC](https://forum.cursor.com/t/agent-shell-fails-in-agents-window-but-succeeds-in-ide-mode-on-windows/165997/5 "2026-07-17T09:29:59Z")

</div>

Hey, thanks for the detailed report. This is a known Windows-specific case. On Windows, agent sandbox only works as a network proxy with no filesystem isolation. If Auto-Run in Sandbox is saved in settings, then shell-exec in the Agents Window closes the stream without an exit event, which leads to no exit status. In IDE mode the path is different, so the command completes there.

Two ways to fix it:

1. Turn on Settings \> Agents \> Inline Editing & Terminal \> Legacy Terminal Tool. This bypasses the sandbox path completely.
2. Or switch Settings \> Agents \> Auto-Run from sandbox mode to Use Allowlist.

Even if the sandbox option isn’t shown in your current build, a previously saved value can stay active and keep breaking the terminal in the Agents Window until you switch it manually, so it’s worth explicitly setting one of the options above.

Let me know if it helped. If the issue still happens after switching, please share the exthost logs: `%APPDATA%\Cursor\logs\...\exthost\anysphere.cursor-agent-exec`, and we can dig deeper.

---

<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:** [August 16, 2026, 9:30am UTC](https://forum.cursor.com/t/agent-shell-fails-in-agents-window-but-succeeds-in-ide-mode-on-windows/165997/6 "2026-08-16T09:30:08Z")

</div>

Closed on August 16, 2026, 9:30am UTC

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