fix(kanban): gate kanban-worker skill inject on true name-resolvability (fix Unknown skill(s) worker death) - #34738
Closed
arakakileo wants to merge 1 commit into
Closed
Conversation
This was referenced Jun 2, 2026
Contributor
|
Thanks for tracing the ambiguous skill-resolution failure carefully. Automated hermes-sweeper review found that current
This shipped in |
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.
Problem
Every dispatched kanban worker can die at startup with
ValueError: Unknown skill(s): kanban-worker, before the agent loop runs —empty workspace, task reclaimed and respawned in a loop.
Root cause
The dispatcher injects
--skills kanban-workergated on_kanban_worker_skill_available(HERMES_HOME), which tests file existence. Theworker resolves the skill by name via
skill_view, which collects allcandidate
SKILL.mdfiles across the profileskillsdir + the profile'sskills.external_dirs, and fails in two ways:profile-scoped skills dir, and no external_dirs entry supplies it.
copy AND a copy reachable via external_dirs pointing at the root skills dir);
skill_viewrefuses to guess.The existence-only guard returns True in the ambiguous case, so the flag is
injected and the worker's resolver then refuses it. This is why copying the
skill into the profile dir made it worse — it forced the ambiguous branch.
Fix
Make the guard mirror the resolver: count distinct resolved
kanban-worker/SKILL.mdfiles across the same search roots the worker uses(profile
skillsdir + the profile's configuredexternal_dirs, read from thathome's config.yaml), and inject only when exactly one resolves. Zero (missing)
and 2+ (ambiguous) both omit the flag. The mandatory kanban lifecycle still
ships via
KANBAN_GUIDANCE, so dropping the supplementary skill is safe.Healthy single-candidate profiles are unchanged (still inject).
Test plan
guard now returns False, worker starts and completes (previously
Unknown skill(s): kanban-worker).tests/hermes_cli/test_kanban_worker_skill_inject.py.Note for maintainers
#30025 generalizes this same guard into
_skill_available_for_homefortask.skillsbut keeps the existence-only check, so it does not fix thisambiguity case. If #30025 lands first, fold this distinct-candidate-count logic
into the shared helper so both the built-in inject and
task.skillsbenefit.