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:
Turn on Settings > Agents > Inline Editing & Terminal > Legacy Terminal Tool. This bypasses the sandbox path completely.
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.