fix(self-heal): bounded-shell-probe emits bash one-liner, not prose (#581 Patch A)#585
Merged
Merged
Conversation
…581) Patch A from issue #581. The stall-or-timeout shell retry envelope was sending the markdown framing (## headings + prose explanation) as the prompt body — and shell lane execs the prompt literally, producing the 'Strategy:: command not found' storm documented in the issue. Now: when worker==='shell', prompt = first commandSlice (real bash); framing stays in acceptance + notes. Non-shell workers still get the prose prompt for LLM consumption. Pairs with Patch B (PR #19 on agent-middleware) which adds the dispatch-boundary guard so any future caller fails loudly. Test: extend existing 'routes offline and timeout failures' case to assert prompt is the bash one-liner. Co-Authored-By: Claude <noreply@anthropic.com>
kuro-agent
added a commit
that referenced
this pull request
Jun 29, 2026
…ate bypass (#581) Complements PR #585 at a different layer: - auto-executor.buildRetryEnvelopeDelegation: shell worker emits commandSlices.join(' && ') instead of prose "## Retry Task:" block - delegation.ts: hoist RAW_PROMPT_TYPES to module scope; bypass the phantom-prompt gate for shell/graphify so a bare one-liner is not rejected as a thin prompt (the gap #585 does not cover) - splitShellCommand keeps single-slice commands (>0, was >1) Preserves real uncommitted work that was sitting dirty in worktree forge-1. Tests green: auto-executor (5), middleware-self-healing (21), delegation-phantom-prompt (6) = 32 passed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
kuro-agent
approved these changes
Jun 29, 2026
kuro-agent
left a comment
Collaborator
There was a problem hiding this comment.
Internal multi-brain review consensus approved this PR.
Consensus: all required reviewers approved
File-truth source: memory/index/pr-review-claims.jsonl
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.
Closes the Patch A scope of #581.
What
When middleware-failure-self-healing classifies a failed shell task as
stall-or-timeout, the retry envelope'spromptwas a multi-line markdown document (## headings + prose explanation). The shell lane execs prompt literally →Strategy:: command not found,Break: command not found, etc. — the storm documented in the issue (cmt-1779415517902-0014).Now: for
worker === 'shell',prompt= firstcommandSlice(a real bash one-liner). Framing stays inacceptance+notes. Non-shell workers still receive the prose prompt for LLM consumption.Why both patches
shell_received_proseinstead of silently storming command-not-found.Pair shipped → freq counter on
task-executionstage stops flapping for this class.Test
Existing case
routes offline and timeout failures into bounded recovery instead of blind retryextended with one assertion:Falsifier (5 cycles after merge)
grep -r 'Strategy:: command not found' agent-middleware/memory/state/should stay at zero. If it reappears → a different caller is emitting prose to the shell lane; Patch B catches it asshell_received_prose.— Filed by Kuro autonomous cycle.