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
4 changes: 2 additions & 2 deletions docs/operations/watcher-thread.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Watcher thread

One thread, by default Lead's on the laptop, hears model, usage-limit and link alerts from every linked environment. The thread events below go instead to the thread that launched the lane, read from the lane's `inbox.origin`, else `inbox.requestedBy`. When that thread is archived, deleted or unknown, a thread event reaches no thread, only `modelAlertWebhookUrl` when set, so a founder-facing watcher never hears about a lane it did not launch. The server decides each event from thread state with no agent judgment, queues it durably, and retries until the receiving machine answers.
One thread, by default Kameron's CoS on the laptop, hears model, usage-limit and link alerts from every linked environment. The thread events below go instead to the thread that launched the lane, read from the lane's `inbox.origin`, else `inbox.requestedBy`. When that thread is archived, deleted or unknown, a thread event reaches no thread, only `modelAlertWebhookUrl` when set, so a founder-facing watcher never hears about a lane it did not launch. The server decides each event from thread state with no agent judgment, queues it durably, and retries until the receiving machine answers.

| Event | Fires when |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
Expand All @@ -14,4 +14,4 @@ Each event reports once per thread and kind until its state changes: a new run,

## Moving the watcher

The watcher is the `modelAlertWatcher` server setting (`{ environmentId, threadId }`, or `null` for none). Its Closura default is in `packages/contracts/src/settings.ts` (`DEFAULT_MODEL_ALERT_WATCHER`). To move Lead to an always-on machine such as the R720, change that one default and ship a build, or set `modelAlertWatcher` in each machine's settings to override it. `modelAlertWebhookUrl` additionally POSTs every alert as JSON.
The watcher is the `modelAlertWatcher` server setting (`{ environmentId, threadId }`, or `null` for none). Its Closura default is in `packages/contracts/src/settings.ts` (`DEFAULT_MODEL_ALERT_WATCHER`). To move the watcher, for example to an always-on machine such as the R720, change that one default and ship a build, or set `modelAlertWatcher` in each machine's settings to override it. `modelAlertWebhookUrl` additionally POSTs every alert as JSON.
9 changes: 6 additions & 3 deletions packages/contracts/src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1191,11 +1191,14 @@ export const ModelAlertWatcher = Schema.Struct({
});
export type ModelAlertWatcher = typeof ModelAlertWatcher.Type;

// Closura: Lead's thread on the laptop hears every machine's alerts and thread events. Moving Lead
// to an always-on machine means changing this one value (or `modelAlertWatcher` on each machine).
// Closura: Kameron's CoS thread on the laptop hears every machine's alerts (the old CoS thread
// retired on 2026-11-20). Moving the watcher means changing this one value (or `modelAlertWatcher`
// on each machine).
const DEFAULT_MODEL_ALERT_WATCHER: ModelAlertWatcher = {
environmentId: EnvironmentId.make("2f360b2e-0386-498a-b9cd-62999f3525ba"),
threadId: ThreadId.make("0ff5603d-8291-4f56-adaf-5132c62016cf"),
threadId: ThreadId.make(
"mcp:launch:4c07a2ef8bc6157f99fbae20642807c05a8a57c53eaec25dd4abfa16bc5b242e",
),
};

export const ResponseStreamingMode = Schema.Literals(["turn", "paragraph"]);
Expand Down
Loading