Skip to content

Commit d2bc1f9

Browse files
t3dotggclaude
andcommitted
docs: restart recovery only wakes for work the agent marked
The restart-recovery doc still said any monitor wakes a settled run and a shell never does, and the shellRuntime comment said only work that wakes the agent holds it. Both now describe the awaited mark. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent a1a05bd commit d2bc1f9

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

‎docs/internals/server-updates.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,11 @@ opt-out. The
7272
requires matching durable run, provider thread, session, and native resume identity.
7373
Queued runs never started, so recovery holds them and continues the run they wait
7474
behind. A settled run qualifies only when the restart cancels work the agent waits on
75-
(a monitor, subagent, or background task) and its session was live, so stale records
76-
from an older crash never wake it. Its continuation prompt is the note of what will not
77-
report back. A shell alone does not wake a settled run: most are dev servers nobody
78-
waits on, so that note waits for the next user message.
75+
(a subagent, a background task, or a shell or monitor the agent marked with
76+
`t3_background_wait`) and its session was live, so stale records from an older crash
77+
never wake it. Its continuation prompt is the note of what will not report back. An
78+
unmarked shell or monitor does not wake a settled run: most are dev servers and their
79+
watchdogs that nobody waits on, so that note waits for the next user message.
7980

8081
Recovery retires effects tied to the lost process and records continuation intent
8182
in the durable outbox. That intent survives another restart before provider startup.

‎packages/client-runtime/src/state/models.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,10 @@ function terminalRunStatus(status: OrchestrationV2RunStatus): boolean {
211211
);
212212
}
213213

214-
// Only work that wakes the agent holds it: commands it left running, such as a
215-
// dev server, present the run's own status (#14872). The server suppresses the
216-
// roster while an interruptible activity run exists, so a remaining roster is
217-
// stronger than checkpoint-oriented waiting.
214+
// Only work the agent waits on holds it: commands and monitors it left running
215+
// unmarked, such as a dev server, present the run's own status (#14872). The
216+
// server suppresses the roster while an interruptible activity run exists, so a
217+
// remaining roster is stronger than checkpoint-oriented waiting.
218218
function shellRuntime(thread: OrchestrationV2ThreadShell): ThreadRuntimeSummary | null {
219219
const parkAtIdle =
220220
backgroundWorkHoldsCompletion(thread.pendingBackgroundTasks ?? []) &&

0 commit comments

Comments
 (0)