Repository navigation
Hold the journey's boundary answer when one command also posts the progress line - #7436
Merged
Merged
Conversation
…ogress line The claude-code journey's `boundary` step holds the wake's answer to `first-wake` in a PreToolUse hook, so the `boundary` comment arrives at the tool boundary after that answer. The hook passed any command containing `--ephemeral`, on the premise that a command posts either a progress line or an answer. The agent may chain both, as `conversation-loop.md` suggests: `leaf thread reply … --ephemeral; <edit>; leaf thread reply … --done`. The hook passed that command, the answer posted unheld, `answer-held` never appeared, and the step waited out its 300 s with "the wake's turn did not answer its comment", though the turn had answered. The hook now holds a command that runs `thread reply` more often than it passes `--ephemeral`, reading the command through jq. And the step stops waiting once `first-wake` is answered, so a hold that misses fails at once, saying the answer went past the hold. Evidence: in run-20261127-102742-3avblaqe (branch mod-line-missing), the last four reply commands of the session were all chained; replayed through both hooks, the old one passed three of them and the new one held all four. A full `leaf-dev journey run claude-code` on this branch passed every step, `boundary` in 31 s; in that run the agent posted each answer without a progress line, so the old hook would have held it too.
leaf-agent
approved these changes
Nov 27, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 27, 2026
…and's text (#7454) The claude-code journey's `boundary` step needs its comment admitted after the wake's turn answers `first-wake` and before the tool boundary after that answer. Its PreToolUse hook found the answer by reading the shell command's text, a rule #6556 added (naming then that an answer posted another way would slip past) and #7436 patched once the agent chained its progress line, edit and answer in one command. This replaces the text rule with the page's own record: a PostToolUse hook holds every tool call while the step runs, each in a file of its own, and the step lets a call go unless the page has `first-wake` answered. The call that answered makes its file after the answer is admitted, so it waits until `boundary` is admitted however the agent writes or batches its calls. The jq read, the `--ephemeral` count, the second marker file and the past-the-hold check go. To weigh: it relies on Claude Code starting PostToolBatch only after every PostToolUse hook of the batch has ended, which 2.1.332 does (two parallel calls, a 3 s PostToolUse hook, PostToolBatch after both). Holding every call costs the step about a second in all. Max asked for a broad simplification that would end this kind of bug, after #7436; nobody has read this yet. A full `leaf-dev journey run claude-code` passed every step, `boundary` in 47 s; `dev/tests/model/test_journey.py` passes. > _This was written by Claude Code on behalf of max-sixty_
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.
The claude-code journey's
boundarystep timed out after 300 s with "the wake's turn did not answer its comment", though the turn had answered. Its PreToolUse hook, which holds the wake's answer so theboundarycomment arrives at the tool boundary after it, passed any command containing--ephemeral. The agent chains the progress line, the edit and the answer in one command (leaf thread reply … --ephemeral; <edit>; leaf thread reply … --done), asconversation-loop.mdsuggests, so the answer went out unheld and the driver waited for a hold that never came.The hook now holds a command that runs
thread replymore often than it passes--ephemeral, and the step stops waiting oncefirst-wakeis answered, so a missed hold fails at once and says so.Replaying the failed run's last four reply commands, the old hook passed the three chained ones and the new hook held all four. A full
uv run leaf-dev journey run claude-codeon this branch passed every step,boundaryin 31 s, though in that run the agent sent its answers without a progress line.dev/tests/model/test_journey.pypasses.Max asked for this fix by dispatching it from a session that saw the failure.