Files
hermes-agent/agent
teknium1 474db5363a fix: kanban guidance and stop nudge resolve worker identity through one helper
Tool access is not worker identity, and an inherited env var is not
ownership: a profile can enable the kanban toolset for an interactive chat
(kanban_show visible, no task), and in-process delegate_task children and
cron runs fired beside a worker inherit HERMES_KANBAN_TASK from the worker's
os.environ. The salvaged commit gated the guidance sites on the env var; an
env-only gate still injects the worker protocol into a cron run or child.

Add agent/delegation_context.py::owned_kanban_task() — HERMES_KANBAN_TASK
iff this execution is the dispatcher-owned worker, else "" — and route the
prompt readers (agent_init guidance, system_prompt fallback, kanban_stop
nudge) through it. Interactive sessions keep kanban_show but no longer
receive "You have been assigned ONE task"; a cron-scope run beside a worker
receives no worker protocol.

The budget-exhausted turn_finalizer outcome (#112817) already landed on
main via #113147 and is not touched here.

Tests: the salvaged parametrized fallback test gains the inherited-env
non-owner row.

Fixes #112486

Co-authored-by: gustavosmendes <gustavosmendes@users.noreply.github.com>
Co-authored-by: Rodkillah <Rodkillah@users.noreply.github.com>
Co-authored-by: chelsealong <chelsealong@126.com>
2026-09-16 17:48:48 -07:00
..
…