Skip to content

fix(kanban): distinguish orchestrator prompt guidance - #74439

Draft
mloesche wants to merge 1 commit into
NousResearch:mainfrom
mloesche:fix/kanban-orchestrator-guidance
Draft

mloesche wants to merge 1 commit into
NousResearch:mainfrom
mloesche:fix/kanban-orchestrator-guidance

Conversation

@mloesche

@mloesche mloesche commented Jul 29, 2026

Copy link
Copy Markdown

Summary

  • distinguish dispatcher workers from opted-in Kanban orchestrators using HERMES_KANBAN_TASK
  • keep worker lifecycle guidance for assigned tasks
  • give normal orchestrator sessions list-first guidance with an explicit task ID for kanban_show
  • preserve session-static prompt caching and the fallback prompt path

Root cause

kanban_show is available to both workers and configured orchestrators, but prompt selection treated tool presence as proof that the process owned a task. Normal orchestrator chats therefore received worker-only instructions to call kanban_show() without an ID.

Verification

  • scripts/run_tests.sh tests/tools/test_kanban_tools.py tests/agent/test_system_prompt.py tests/agent/test_system_prompt_restore.py -q — 52 passed
  • ruff check on all changed files — passed
  • real Geordi profile prompt probe confirmed orchestrator guidance present, worker claim absent, list-first and explicit-ID instructions present
  • two independent reviews found no blocking correctness or security issues

@mloesche
mloesche force-pushed the fix/kanban-orchestrator-guidance branch from 7386a92 to 84e7d84 Compare July 29, 2026 23:02
@alt-glitch alt-glitch added type/bug Something isn't working comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Jul 29, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Duplicate of #68608: both split worker and orchestrator prompt guidance using HERMES_KANBAN_TASK; #68608 also covers the fallback path.

@teknium1

Copy link
Copy Markdown
Collaborator

Thanks for isolating the worker/orchestrator distinction; the underlying defect is present on current main.

Problems

  • agent/prompt_builder.py adds an orchestrator block but drops routing safeguards currently injected through KANBAN_GUIDANCE: real-profile discovery and parents=[...] dependencies (agent/prompt_builder.py:287-290), captured-only created-card IDs (agent/prompt_builder.py:284-286), and attachment handling (agent/prompt_builder.py:280-283). Those details were deliberately folded into injected guidance by 84e1d31e5442eeff0bfcf1c2ffab6acf7fe95f45; preserve them in the new orchestrator block.
  • The changed bypass-init branch in agent/system_prompt.py has no direct regression coverage. The added test covers normal AIAgent initialization only.

Suggested changes

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-caching Sweeper risk: may break/degrade prompt caching or cache-key stability (invariant) sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cron Cron scheduler and job management duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-caching Sweeper risk: may break/degrade prompt caching or cache-key stability (invariant) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants