Separate agent task completion from long-running background processes
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description

## Problem
When an agent starts an intentionally long-running process, such as an emulator, that process can keep the entire agent session in a running state even after the requested task has completed.
This causes two confusing behaviors:
- The user does not receive a task-completion notification because the session never reports as done.
- The Agents window can continue showing statuses such as "Thinking..." or "Analyzing..." even though the agent has finished the task and only the background process remains active.
## Example
1. Ask an agent to start an emulator and complete a task that uses it.
2. The agent finishes the requested task but intentionally leaves the emulator running.
3. The session continues to appear active, no completion notification is shown, and the displayed status does not clearly distinguish completed work from the remaining background process.
## Desired behavior
It would be useful to separate task completion from the lifetime of background processes. For example:
- A dedicated child/sub-session could own the long-running process.
- Other sessions could interact with that process without having their completion state tied to its lifetime.
- The original task could report as complete and send its normal completion notification while the background process continues running.
- The Agents window could show an explicit state such as "Task complete · background process running" instead of continuing to show "Thinking..." or "Analyzing...".
This would make it clearer which work is complete, which process is still active, and which session owns that process.
Contributor guide
Assessment
This issue has not been assessed yet.