# Add a setting to keep Agent terminals alive when switching chats

**URL:** <https://forum.cursor.com/t/add-a-setting-to-keep-agent-terminals-alive-when-switching-chats/168452>\
**Category:** Feature Requests\
**Tags:** terminal, chat\
**Created:** [August 15, 2026, 3:04am UTC](https://forum.cursor.com/t/add-a-setting-to-keep-agent-terminals-alive-when-switching-chats/168452 "2026-08-15T03:04:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kun\_wang](https://avatars.discourse-cdn.com/v4/letter/k/958977/32.png) [@kun\_wang](https://forum.cursor.com/u/kun_wang)\
**Post date:** [August 15, 2026, 3:04am UTC](https://forum.cursor.com/t/add-a-setting-to-keep-agent-terminals-alive-when-switching-chats/168452/1 "2026-08-15T03:04:49Z")

</div>

### Describe the request

This makes Agent-driven local full-stack workflows fragile: frontends lose watch/recompile sessions; backends drop mid-debug. Users then must restart services one-by-one again.  
Forum staff have described this as terminal **rebind failure + intentional GC** , not always an intentional product preference — but from a user perspective we need an **opt-in keep-alive**.

### Why a setting matters

- Some users want aggressive cleanup (current behavior).
- Many local-dev users want Agent terminals to behave like normal Editor terminals: **survive chat switches**.
- Without a setting, Agents cannot reliably “start services and leave them running” across sessions.

### Proposed behavior

When keep-alive is enabled:

- Switching Agent chats must **not** terminate the underlying process.
- Terminals should remain listed and re-bindable (Terminal list / other agents group is fine).
- Optional: only GC terminals after explicit user Stop, or when the workspace folder is closed.

### Environment / context

- OS: Windows 11
- Use case: sequential start of multiple FE/BE services via Agent shells; frequent chat switches while coding
- Current workaround: run services in classic Editor user terminals / Tasks (less convenient when asking Agent to start them)

### Acceptance criteria

1. A documented setting exists in Cursor Settings.
2. With the setting ON, Agent-started long-running processes survive chat/workspace switches for at least N hours (or until user stops them).
3. With the setting OFF, current GC behavior remains.  
Thanks — this would materially improve Agent-assisted local development.

* * *

## 中文摘要（方便你对照）

希望 Cursor 增加设置项：切换 Agent 会话/工作区时，可选择 **不关闭** Agent 拉起的终端及其中的长驻进程（如 ng serve / spring-boot:run）。  
现状约 1 分钟重连宽限期后会杀进程，且没有开关；导致本地起服工作流不稳定。
