docs(core): clarify subagent settlement lifecycle

This commit is contained in:
Kit Langton
2026-11-04 17:08:32 -08:00
Unverified
parent 298f89c5cb
commit d009fc00b7
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -55,8 +55,8 @@ export const outstanding = Effect.fnUntraced(function* (
/**
* Whether an idle Session will be woken again by its own work: a background job of its own or a
* descendant's still running, or admitted input not yet delivered, such as a finished shell's
* notice. A subagent's report waits for this so it carries the child's final state.
* descendant's still running, completion notices awaiting admission, or admitted input not yet
* delivered. A subagent's report waits for this so it carries the child's final state.
*/
export const unsettled = Effect.fnUntraced(function* (
jobs: Pick<Job.Interface, "runningBackground" | "pendingBackground">,
+2 -2
View File
@@ -58,8 +58,8 @@ const make: Effect.Effect<
}).pipe(Effect.catchTag("Session.NotFoundError", () => Effect.void))
})
// Waits until the child stops for good: idle, with no background work or undelivered input left
// to wake it. It only waits and never resumes, since resuming an idle child runs a model step.
// Resume once for launch, then wait until the child is idle with no background work or input
// left. Never resume just to inspect settlement: resuming an idle child runs another model step.
const settle = Effect.fnUntraced(function* (sessionID: SessionSchema.ID) {
const outcomes = [
SessionEvent.Execution.Succeeded,