fix(watchdog): stop phase-machine handoff/gate-token work after SEQUENCE-COMPLETE

Gate-token tracking + handoff pings kept running on the completed phase machine,
churning 0-token gate records every tick. Gate them on `not seq_done`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UWTdUq2bsic7JZGqJp3nD6
This commit is contained in:
2026-06-24 15:38:02 +00:00
parent 164df87e98
commit 08bbb60343

View File

@ -968,7 +968,7 @@ def watchdog_loop(cfg_path):
has_loops = bool(loop_agents(cfg)) has_loops = bool(loop_agents(cfg))
seq_done = (Path(cfg["log_dir"]) / "SEQUENCE-COMPLETE").exists() seq_done = (Path(cfg["log_dir"]) / "SEQUENCE-COMPLETE").exists()
if has_loops: if has_loops and not seq_done:
handoff_check(cfg) handoff_check(cfg)
gate_token_check(cfg) gate_token_check(cfg)
for a in watched(cfg): for a in watched(cfg):