Expand description
The self-correcting goal watchdog. A supervisor-level periodic
check — it never blocks the agent loop — of whether the configured goal is
achieved, or the agent is stuck (no progress across stuck_after checks):
- achievement is judged CEL-condition first (a cheap deterministic
predicate over the live status), then an LLM judge for fuzzy goals
(
check.via: agent|both) — run asynchronously on an executor thread and folded back viaEvent::Background, so it never blocks the loop; - progress is a monotonic activity signal (finished runs + turns); when
it stalls for
stuck_aftercycles the watchdog self-corrects; - dispositions:
on_achieved→finish(drain, exit 0) /idle(stop checking) /{workflow}(run it);on_stuck→{workflow}(a recovery / re-plan workflow — the concrete self-correction) /replan/escalate/idle/finish.
The check runs on a durable {"kind":"goal"} timer, so its cadence survives a
restart.