fix(kanban): allow orchestrator profiles to see kanban tools via toolsets config#19606
Merged
Conversation
The _check_kanban_mode() gating function only checked for HERMES_KANBAN_TASK env var, which is only set by the dispatcher when spawning workers. This prevented orchestrator profiles (like techlead) from using kanban_create, kanban_link, etc. even when they had 'kanban' explicitly in their toolsets config. Now uses load_config() from hermes_cli.config (which has mtime-based caching) to check if 'kanban' is in the profile's toolsets list. This enables orchestrators to route work via Kanban while workers continue using the dispatcher env var. Fixes #18968
PR #19427 dropped the 'You are a Kanban worker' identity line from KANBAN_GUIDANCE so SOUL.md stays authoritative for profile identity. This test assertion was stale against that change; update it to the new protocol-only header.
This was referenced May 4, 2026
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Salvage of #18970 onto current main + test fixup for #19427.
Closes #18968.
Summary
_check_kanban_mode()now enables kanban tools for any profile that haskanbanin itstoolsetsconfig, not just dispatcher-spawned workers (HERMES_KANBAN_TASKenv). Orchestrator profiles liketechleadcan now actually callkanban_create/kanban_linkto route work — previously their SOUL.md told them to use kanban tools that were never registered into their schema, which fueled hallucination.Changes
tools/kanban_tools.py: gate returns True when HERMES_KANBAN_TASK is set ORkanban∈ config.toolsets. Worker fast-path unchanged.tests/tools/test_kanban_tools.py: updatetest_kanban_guidance_in_worker_promptheader assertion — fix(kanban): drop worker identity claim from KANBAN_GUIDANCE #19427 replaced"You are a Kanban worker"with"Kanban task execution protocol", the old assertion was stale.Validation
E2E tested all four gate cases against current main:
toolsets: [kanban, ...]toolsets: [terminal, web](no kanban)HERMES_KANBAN_TASKsettests/tools/test_kanban_tools.py— 31/31 pass.Duplicates closed with credit