Skip to content

fix(tools): clarify kanban_complete phantom-card retry guidance - #23072

Closed
konsisumer wants to merge 1 commit into
NousResearch:mainfrom
konsisumer:fix/kanban-complete-phantom-retry
Closed

fix(tools): clarify kanban_complete phantom-card retry guidance#23072
konsisumer wants to merge 1 commit into
NousResearch:mainfrom
konsisumer:fix/kanban-complete-phantom-retry

Conversation

@konsisumer

Copy link
Copy Markdown
Contributor

Clarify the kanban_complete tool_error returned on a hallucinated-card rejection so the worker can recognize the run is still recoverable, and pin the retry contract with regression tests at both the kernel and tool layers.

What changed and why

  • tools/kanban_tools.py: rewrote the HallucinatedCardsError tool_error message to explicitly state "Your task is still in-flight (no state change). Retry kanban_complete with ... created_cards=[] to skip the card-claim check entirely." The kernel already left the task runnable after a phantom rejection, but the previous wording read like a terminal failure, so workers were observed abandoning the run and tripping the failure breaker rather than retrying.
  • tests/hermes_cli/test_kanban_core_functionality.py: new test_complete_can_retry_after_phantom_rejection exercises both retry shapes at the kernel level — created_cards=[] (escape hatch) and a corrected list — and asserts both the audit and the eventual completed event land.
  • tests/tools/test_kanban_tools.py: three new tool-level tests pin (a) the literal phrasing the worker depends on to discover the retry path, (b) successful retry via created_cards=[], and (c) successful retry via a corrected list.

No behavior change in the kernel — the fix is the messaging plus the regression tests that make a future reword of the recovery cues fail CI.

How to test

  • pytest tests/tools/test_kanban_tools.py tests/hermes_cli/test_kanban_core_functionality.py -q --timeout=60 (the three new tool-level tests + the new kernel-level test all pass; pre-existing 246-test kanban suite stays green).

What platforms tested on

  • macOS on darwin-arm64 (local)

Fixes #22923

When kanban_complete rejects a created_cards list as hallucinated, the
task is intentionally left in-flight (the gate runs before the write
txn) so the worker can retry with a corrected list or pass
created_cards=[] to skip the check. The retry path already worked, but
the previous error wording read like a terminal failure and workers
were observed abandoning the run instead of trying again.

Spell out the recovery path explicitly in the tool_error response
("Your task is still in-flight ... Retry kanban_complete with ...") and
add regression coverage at both the kernel and tool layers so the
retry contract — and the wording the worker depends on to discover
it — is pinned.

Fixes NousResearch#22923
@teknium1

Copy link
Copy Markdown
Contributor

Salvage merged via PR #23453 (rebase) — your fix shipped on main with your authorship preserved (re-attributed during salvage from der@konsi.org to the GitHub-noreply form for release-notes credit). AUTHOR_MAP entry was already added in yesterday's #23071 salvage.

Clean fix shape — kernel behavior already correct, just messaging legibility for the worker model. The literal-phrase regression tests are exactly the right shape for a fix-by-rewording change since a future reword can silently break worker self-recovery without the rewording being obviously wrong on its own.

Thanks @konsisumer — two clean focused PRs in two days.
#23453

@teknium1 teknium1 closed this May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: kanban_complete hallucinated-card gate blocks completion with no recovery — worker must crash or abandon task

3 participants