diff --git a/agents.py b/agents.py index cf30829..96006b3 100755 --- a/agents.py +++ b/agents.py @@ -978,12 +978,17 @@ def watchdog_loop(cfg_path): if session_alive(a["session"]): limit_tick(cfg, a, capture_pane(a["session"], 40)) - if not seq_done: - for name, el in list(wake_elapsed.items()): - interval = int(cfg["agents"][name]["wake"].get("interval", 3600)) - if el >= interval: - if wake_agent(cfg, cfg["agents"][name]): - wake_elapsed[name] = 0 + for name, el in list(wake_elapsed.items()): + agent = cfg["agents"][name] + # After the phase sequence completes, quiet the loop-tied wakes (e.g. the on-demand + # auditor) — but a PERSISTENT agent (the operator-facing supervisor) keeps waking, so its + # hourly supervision survives SEQUENCE-COMPLETE and can drive follow-on work (a second build). + if seq_done and agent.get("kind") != "persistent": + continue + interval = int(agent["wake"].get("interval", 3600)) + if el >= interval: + if wake_agent(cfg, agent): + wake_elapsed[name] = 0 # Auto-advance is checked EVERY tick (not just the heavy tick) so a completed phase advances # within signal_interval of its `## DONE` landing, instead of idling up to heavy_interval.