# Unexpected terminal killing

**URL:** <https://forum.cursor.com/t/unexpected-terminal-killing/168134>\
**Category:** Bug Reports\
**Tags:** terminal, agents-window\
**Created:** [August 12, 2026, 12:37pm UTC](https://forum.cursor.com/t/unexpected-terminal-killing/168134 "2026-08-12T12:37:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tushar\_Bosamiya](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@Tushar\_Bosamiya](https://forum.cursor.com/u/Tushar_Bosamiya)\
**Post date:** [August 12, 2026, 12:37pm UTC](https://forum.cursor.com/t/unexpected-terminal-killing/168134/1 "2026-08-12T12:37:40Z")

</div>

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

Cursor IDE

### Describe the Bug

When one or more terminals are open in Cursor IDE, closing the Agent window automatically terminates all the existing terminal sessions.

### Steps to Reproduce

1. Open Cursor IDE.
2. Open one or more terminals.
3. Open the Agent window.
4. Run any process/command in the terminal.
5. Close the Agent window.
6. Observe that after slight delay the existing terminal sessions are automatically terminated.

### Expected Behavior

Closing the Agent window should not affect or terminate any existing terminal sessions. All open terminals and their running processes should continue to work normally.

### Screenshots / Screen Recordings

### Operating System

Windows 10/11

### Version Information

Version: 3.15.6 (user setup)  
VS Code Extension API: 1.128.0  
Commit: a1f686545fd0ce8917bbd2449f733551a9bce420  
Date: 2026-08-06T01:41:03.876Z  
Layout: IDE  
Build Type: Stable  
Release Track: Default  
Electron: 40.10.3  
Chromium: 144.0.7559.236  
Node.js: 24.15.0  
V8: 14.4.258.32-electron.0  
xterm.js: 6.1.0-beta.291  
OS: Windows\_NT x64 10.0.26200

### 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:** [August 12, 2026, 2:06pm UTC](https://forum.cursor.com/t/unexpected-terminal-killing/168134/5 "2026-08-12T14:06:01Z")

</div>

Hey, thanks for the detailed report with steps and the video. The Windows confirmation is helpful.

This is a known issue we’re tracking: if you have both the Agents window and the IDE window open on the same folder, closing the Agents window will also terminate terminals in the IDE window. That shouldn’t happen, and it’s not related to your setup. I don’t have an exact timeline yet, but I’ll post an update here when I have one.

For now, the workaround is:

- Keep the Agents window open while you have important long running processes in the terminal.
- Or run those processes in an external terminal outside Cursor, so closing the window won’t affect them.

Let me know if the behavior differs from what’s described, or if you can reproduce it in other scenarios.

---

<div class="post-metadata">

**Author:** ![Alex\_Goldstein](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@Alex\_Goldstein](https://forum.cursor.com/u/Alex_Goldstein)\
**Post date:** [October 19, 2026, 5:06pm UTC](https://forum.cursor.com/t/unexpected-terminal-killing/168134/8 "2026-10-19T17:06:12Z")

</div>

Still happening on macOS, two months after this was acknowledged.

Cursor 3.24.18, macOS 27.0.1 (26A434). Agents window and IDE window open on the same folder; closing the Agents window terminates every terminal in the IDE window.

Each terminal ran a long-lived CLI that logs its own shutdown, so I have timestamps (UTC-7). Bursts that completed within one second, Oct 14 to 19, 28 terminals:

```auto
2026-10-14 13:00:55 11 terminals within 1s
2026-10-14 13:03:43 6 terminals within 1s
2026-10-16 11:53:48 6 terminals within 0s
2026-10-19 07:07:01 5 terminals within 0s

```

Processes get a graceful shutdown signal, not a hard kill. Terminals in a separate tmux server outside Cursor’s process tree survive. Each lost terminal held a long-running session, so every event means rebuilding that context. Is there an ETA, or a setting to stop the Agents window from owning IDE terminals?

---

<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:** [October 19, 2026, 6:24pm UTC](https://forum.cursor.com/t/unexpected-terminal-killing/168134/9 "2026-10-19T18:24:31Z")

</div>

Hey, thanks for such a detailed report. The timestamps really help.

Yes, the issue is still there on 3.24.18. If the Agents window and the IDE window are opened on the same folder, closing the Agents window also stops the terminals in the IDE. Your setting isn’t related to this. I’ve passed it to the team again with your details too, including the version, macOS 27.0.1, and the number of terminals at those times. There’s no ETA yet, but I’ll post here when there’s an update.

There isn’t a separate setting to disable this right now. `terminal.integrated.enablePersistentSessions` doesn’t help in this case either. For now, the only workarounds are:

- don’t close the Agents window while important long-running processes are still running in the IDE
- run those processes outside Cursor, in an external terminal or in a separate tmux server, like you already noticed

It sucks that this means restoring session context every time. If you notice the same behavior in another scenario, for example without the same folder open in both windows, please let me know.
