Skip to content

The agent that grows with you

fix(kanban): CLI and kanban_complete tool report an empty-completion refusal

teknium1c74624986197
diff --git a/hermes_cli/kanban.py b/hermes_cli/kanban.py
index 8c146d36553..e5bd14a87fa 100644
--- a/hermes_cli/kanban.py
+++ b/hermes_cli/kanban.py
@@ -933,6 +933,10 @@ def _cmd_complete(args: argparse.Namespace) -> int:
f"worker, `hermes kanban reclaim {tid}` to release it, or re-run with "
f"--force to close its run and complete anyway.")
return False
+ except kb.EmptyCompletionError as empty_err:
+ fail_msg[tid] = (f"cannot complete {tid}: {empty_err}. Pass --result/--summary "
+ f"describing what was done (an empty completion is not evidence).")
+ return False
if not done:
# complete_task returns bare False for a dependency refusal too;
# name the open parents instead of claiming the id is unknown.
diff --git a/tools/kanban_tools.py b/tools/kanban_tools.py
index 95415e7d86e..896c313049f 100644
--- a/tools/kanban_tools.py
+++ b/tools/kanban_tools.py
@@ -706,6 +706,13 @@ def _handle_complete(args: dict, **kw) -> str:
f"in-flight (no state change). Retry kanban_complete with the same "
f"summary/metadata and either drop these ids from created_cards, or pass "
f"created_cards=[] to skip the card-claim check entirely.")
+ except kb.EmptyCompletionError as empty_err:
+ # Same shape as the card gate: nothing was mutated, the audit event
+ # already landed; the worker retries with evidence instead of stalling.
+ return tool_error(
+ f"kanban_complete blocked: {empty_err}. Your task is still in-flight (no state "
+ f"change). Retry kanban_complete with a non-empty summary or result describing "
+ f"what was done.")
task = kb.get_task(conn, tid)
if not ok:
# complete_task reports every refusal as bare False; a reopened or