diff --git a/hermes_cli/kanban_db.py b/hermes_cli/kanban_db.py index 2080d6a6fff..b8afac6c16e 100644 --- a/hermes_cli/kanban_db.py +++ b/hermes_cli/kanban_db.py @@ -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 diff --git a/tests/hermes_cli/test_kanban_core_functionality.py b/tests/hermes_cli/test_kanban_core_functionality.py index 4ca72e8ce57..30fa79d2a2f 100644 --- a/tests/hermes_cli/test_kanban_core_functionality.py +++ b/tests/hermes_cli/test_kanban_core_functionality.py @@ -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"]