Metadata
| Status | done |
|---|---|
| Assigned | agent-740 |
| Created | 2026-07-25T13:23:19.056075522+00:00 |
| Started | 2026-07-25T14:08:29.460557366+00:00 |
| Completed | 2026-07-25T14:17:18.171756997+00:00 |
| Tags | research, design, daemon, lifecycle |
| Tokens | 3004091 in / 19022 out |
Description
Objective
Study and design a long-lived, periodically-waking "supervisor" (hard) agent inside the WG daemon — a Casa-style persistent persona (see docs/design-casa-wgfed-adapter.md) rather than an ephemeral per-task worker. It wakes on a tick (every N minutes), scans the task graph for tasks failed/stuck "for dumb reasons," and safely resets/requeues them. It keeps its own persistent memory of activity so it does not flap and can recognize recurrence.
Research questions
- Wake cadence: tick interval vs event-driven vs hybrid; avoid thundering herd / double-acting with the existing coordinator reaper and
auto_rescue_on_eval_fail. - What counts as a "dumb failure" worth auto-resetting? Inventory the classes seen in this graph:
failed-pending-eval/pending-eval(eval-pipeline exhaustion),agent-exit-nonzerocrashes, dead-agent orphans, intentional-crash test tasks (e.g.storm-source), eval-satellite debris, respawn storms. For each: safe reset policy vs leave-for-human. - Memory model: what activity history the supervisor keeps, where (graph task? sidecar file?), how it dedupes/recalls, and how it avoids reset loops (max-attempts, backoff, escalation to human).
- Composition with existing lifecycle: reaper,
wg recover,auto_rescue_on_eval_fail, eval-lifecycle-reconcile. The supervisor must not fight them; define the boundary (what only the supervisor does). - Failure mode of the supervisor itself: what if it hangs or mis-resets? Liveness, bounded blast radius, dry-run / audit-first mode.
- How detection results feed the rate-limit/parallelism controller (sibling studies).
Inputs
- docs/design-casa-wgfed-adapter.md (long-lived persona pattern)
- src/ (coordinator, reaper, recover, eval-lifecycle) — survey current health/recovery code
- The hand-cleared incidents in this session (failed-pending-eval tar pits, storm-source loop) as worked examples
Deliverable
docs/studies/supervisor-hard-agent-design.md
Validation
- Design doc committed at docs/studies/supervisor-hard-agent-design.md
- Enumerates the dumb-failure classes present in this graph with a per-class reset/leave policy
- Defines wake cadence, memory model, loop-prevention, and the boundary vs existing reaper/recover/eval-reconcile
- Includes a fail-safe / dry-run / audit-first rollout plan and the supervisor's own failure handling
- Cites the specific source files/functions it would touch or add
Depends on
- (none)
Required by
Log
- 2026-07-25T13:23:19.037793891+00:00 Task paused
- 2026-07-25T13:24:22.895142932+00:00 Task published
- 2026-07-25T14:08:29.537574911+00:00 Spawned by coordinator --executor pi --model zai:glm-5.2 --isolation required-worktree
- 2026-07-25T14:08:43.912193437+00:00 Starting: reading casa adapter doc + surveying reaper/recover/eval-lifecycle/coordinator code
- 2026-07-25T14:12:41.350200976+00:00 Survey complete: reaper(triage.rs), reconcile_durable_verdicts(eval_lifecycle.rs), respawn throttle, sweep, recover, coordinator loop (mod.rs). Writing design doc.
- 2026-07-25T14:16:45.570767942+00:00 Delivered docs/studies/supervisor-hard-agent-design.md. Validation: [x] doc committed [x] 8 dumb-failure classes C1-C8 with per-class reset/leave policy [x] wake cadence(180s slow tick)+memory model(graph-row+sidecar)+loop-prevention(cap/min-interval/per-pass)+boundary vs reaper/sweep/reconciler/recover [x] 4-stage dry-run rollout + supervisor self-failure handling(liveness/blast-radius/mis-reset/kill-switch) [x] cites triage.rs:233,coordinator.rs:4793/3990,eval_lifecycle.rs:2089/1590,sweep.rs:57,graph.rs:129/197,config.rs
- 2026-07-25T14:16:45.694250132+00:00 Committed: 0266c746 — pushed to remote (wg/agent-740/study-long-lived)
- 2026-07-25T14:17:18.171759657+00:00 Task marked as done; scheduled evaluator is advisory evidence only (execution is not a quality pass)