Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/orchestration-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,9 @@ Ownership decides when the tree stops:
| --- | --- |
| Switching which session is viewed | keeps running |
| Forking a session | keeps running; the new session starts with none of them |
| Starting a new session, or resuming another one | keeps running |
| Reloading settings or extensions | keeps running |
| The owning session is deleted, replaced, or resumed away | stopped |
| The owning session is deleted | stopped |
| The host exits | stopped |

Stopping goes through three layers, from narrowest to widest:
Expand Down
8 changes: 4 additions & 4 deletions packages/coding-agent/src/features/step.ts
Original file line number Diff line number Diff line change
Expand Up @@ -590,10 +590,10 @@ function publishBackgroundCommandStatus(ctx: ExtensionContext): () => void {
/**
* Release the background process trees one session owns.
*
* Called from `session_shutdown`, which fires only when the session is really going away: `/new`,
* resume, a deleted session, and quit. A session switch or a fork reuses the same session object
* and never reaches this handler, so a dev server the user is watching keeps running while they
* look at another conversation. That is the intended difference between "not visible" and "closed".
* Called from `session_shutdown` when `reason === "quit"`. That handler also fires for `new`,
* `resume`, `fork` and `reload`, and those keep the trees running: the conversation that owns them
* is still on disk — and, in a multi-session host, still on screen — so stopping its dev server
* would look like a bug. Only a host that is exiting, or a session being deleted, ends the work.
*
* Failure is reported, not thrown: a session that cannot stop one tree must still finish shutting
* down, and the host-exit sweep is the backstop.
Expand Down
Loading