fix(kanban): keep delegated results in worker turn - #63218
Conversation
Dispatcher-spawned Kanban workers are finite one-shot processes, so detached delegation completions can outlive their only consumer. Mark that runtime as unable to deliver async completions and reuse the synchronous delegation fallback, returning required child results before the worker exits.\n\nAlso make unsupported-session notes runtime-generic and cover the delayed-child lifecycle regression.\n\nRefs NousResearch#63169
|
Thanks for the focused fix. The current-main path confirms the premise: dispatcher workers are launched as finite The change uses the established unsupported-delivery fallback rather than adding a tool, schema, configuration option, or new delivery mechanism. It also keeps asynchronous behavior for normal long-lived sessions. No blocking correctness issue was found from the diff and current-main inspection. This is an automated hermes-sweeper review. |
|
Merged via #70133 — your commit was cherry-picked onto current main with your authorship preserved in git history (merge SHA 4c88e21). The only reconciliation needed was merging your runtime-generic diagnostics wording with the stateless-channel messages that landed in #66617 after you opened this. Thanks for the clean fix and the delayed-child regression test — the finite-runtime framing was exactly right. |
What does this PR do?
Dispatcher-spawned Kanban workers now treat detached async delivery as unsupported. When a worker calls
delegate_task, Hermes reuses the existing synchronous fallback and returns the consolidated child result in the same turn, before the one-shot worker process can exit.The same finite-runtime capability also prevents terminal completion watchers from promising delivery after a Kanban worker exits. Long-lived CLI, TUI, Desktop, and messaging-gateway sessions retain their existing async behavior.
The root cause was a lifecycle mismatch: top-level model delegation is backgrounded, while a Kanban worker is a finite subprocess. The background completion queue assumes its parent session remains alive, so a delayed child could outlive its only consumer and leave the card running until the dispatcher classified the dead worker as crashed or
protocol_violation.Related Issue
Fixes #63169
Type of Change
Changes Made
How to Test
On the parent commit, run the focused regression and observe both new tests fail: the capability reports
Trueanddelegate_taskallocates a detached async record.On this branch, run:
Confirm all 53 directly relevant tests pass. The broader delegation and Kanban tool suites also pass (253 tests), for 306 focused tests total.
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — N/A; runtime contract comments and diagnostics were updated in codecli-config.yaml.exampleif I added/changed config keys — N/A; no config changesCONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/A; existing capability/fallback architecture is reusedScreenshots / Logs