fix(kanban): pass accept-hooks to worker chat subprocess

This commit is contained in:
LeonSGP43 2026-05-18 20:23:42 -07:00 committed by Teknium
parent 0f620138b0
commit 8bfb456948
2 changed files with 9 additions and 0 deletions

View file

@ -4414,6 +4414,11 @@ def _default_spawn(
cmd = [
*_resolve_hermes_argv(),
"-p", profile_arg,
# Worker subprocesses switch to a profile-scoped HERMES_HOME above,
# so they see that profile's shell-hook allowlist instead of the
# dispatcher's root allowlist. Pass --accept-hooks explicitly so
# profile-local worker sessions still register configured hooks.
"--accept-hooks",
# Auto-load the kanban-worker skill so every dispatched worker
# has the pattern library (good summary/metadata shapes, retry
# diagnostics, block-reason examples) in its context, even if

View file

@ -2730,6 +2730,10 @@ def test_default_spawn_auto_loads_kanban_worker_skill(kanban_home, monkeypatch):
assert cmd[idx + 1] == "kanban-worker", (
f"expected 'kanban-worker', got {cmd[idx + 1]!r}"
)
assert "--accept-hooks" in cmd, f"spawn argv missing --accept-hooks: {cmd}"
assert cmd.index("--accept-hooks") < cmd.index("chat"), (
f"--accept-hooks must come before 'chat' in argv: {cmd}"
)
# Assignee + task env are still present
assert "some-profile" in cmd
env = captured["env"]