fix(kanban): spawn goal_mode workers with -Q so the goal loop actually runs

_default_spawn sets HERMES_KANBAN_GOAL_MODE=1 but launched 'chat -q' without
-Q; _run_kanban_goal_loop_q only executes in the quiet single-query branch,
so goal-mode never ran for dispatcher-spawned workers — they got one turn,
printed text, exited rc=0, and tripped the protocol-violation circuit
breaker (2026-06-09, cards t_d9cbe312 et al). Root-cause report + upstream
issue draft in kanban workspace t_720c5c60.
This commit is contained in:
agent 2026-06-10 10:23:08 -07:00 committed by Teknium
parent 0709714a6c
commit 80b58ec71d

View file

@ -8046,6 +8046,13 @@ def _default_spawn(
"chat",
"-q", prompt,
])
if task.goal_mode:
# Goal-mode workers must take the fully-quiet single-query path:
# the kanban goal-loop hook (_run_kanban_goal_loop_q) only runs in
# cli.py's quiet branch. Without -Q the worker gets exactly one
# turn, prints text, exits rc=0, and the dispatcher records a
# protocol violation (incident 2026-06-09 t_d9cbe312).
cmd.append("-Q")
# Redirect output to a per-task log under <board-root>/logs/.
# Anchored at the board root (not the shared kanban root), so
# `hermes kanban log` on a specific board reads its own file and