Skip to content

The agent that grows with you

fix(kanban): decode the guard's comment body once

teknium1f8133e9e32ec
diff --git a/hermes_cli/kanban_db_dispatch.py b/hermes_cli/kanban_db_dispatch.py
index c8bf050e469..b1580608e45 100644
--- a/hermes_cli/kanban_db_dispatch.py
+++ b/hermes_cli/kanban_db_dispatch.py
@@ -1587,7 +1587,8 @@ def check_respawn_guard(
"WHERE task_id = ? AND created_at >= ? ORDER BY created_at DESC",
(task_id, pr_cutoff),
).fetchall():
- if not (_kb._lossy_text(c["body"]) and _RESPAWN_GUARD_PR_URL_RE.search(_kb._lossy_text(c["body"]))):
+ body = _kb._lossy_text(c["body"])
+ if not (body and _RESPAWN_GUARD_PR_URL_RE.search(body)):
continue
events = conn.execute(
# Strictly after: a same-second tie stays guarded (fail closed).