Skip to content

Expect the claude-code journey's woken comment from the watch after Escape - #3283

Merged
max-sixty merged 2 commits into
mainfrom
fix-journey-woken-step
Oct 20, 2026
Merged

max-sixty merged 2 commits into
mainfrom
fix-journey-woken-step

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

uv run leaf-dev journey claude-code --hooks-module failed its woken step on main with "woken: the command ended before Escape". The step waited for the hooks module to hand the comment to the running turn while its shell command still ran, and only then pressed Escape. #3169 removed that mid-turn append, so pending input now waits for the next PostToolBatch, which fires only when the command ends. In the failing run on main, the comment arrived at 23:40:13 and was picked up at 23:40:38, when the 25 s sleep finished.

The module itself behaves as its header describes. The turn never read the comment, so the watch the module starts after Escape wakes for it, Claude Code drops the prompt, and the page nudges the session, whose new turn answers it. The step now requires that outcome, and no longer relies on the old append or the "Carry on" prompt that answered it.

  • woken requires that the turn has not read the comment when Escape lands. With the module, a turn after Escape must answer it without the user typing. In both modes, the comment sent afterwards must be answered too.
  • after_escape takes the stopped turn. It accepts a later turn in place of a closed one or a running watch, because the watch after Escape may already have woken that turn.
  • The module's suite test (test_the_module_hands_input_to_a_running_turn_and_closes_an_interrupted_one) now leaves an unread comment pending at Escape, the journey's case. Before, it posted the comment after the watch had started.

Journey results: on main, --hooks-module failed at woken after escape passed. On this branch, every step passed in two runs with --hooks-module, where woken read "turn closed, no watch running, the page reads working; nudged", and in one run without it.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 2 commits October 20, 2026 00:09
…scape

`leaf-dev journey claude-code --hooks-module` failed its `woken` step on
main with "the command ended before Escape". The step waited for the
hooks module to hand the comment to the running turn while its shell
command still ran, then pressed Escape. #3169 removed that mid-turn
append, so pending input now waits for the next PostToolBatch, which
comes only when the command ends: the comment arrived at 23:40:13 and
was picked up at 23:40:38, 25 s later, when the sleep finished.

The module behaves as designed: the turn never read the comment, so the
watch the module starts after Escape wakes for it, Claude Code drops
the prompt, and the page nudges the session, whose new turn answers it.
The step now requires that, rather than the old append and the "Carry
on" prompt that answered it.

- `woken` requires that the turn has not read the comment when Escape
  lands; with the module, that a turn after Escape answers it without
  the user typing; and in both modes that the comment sent afterwards is
  answered too.
- `after_escape` takes the stopped turn, and accepts a later turn in
  place of a closed one or a running watch, since the watch after Escape
  may already have woken that turn.
- The module's suite test now leaves an unread comment pending at
  Escape, the journey's case, where it used to post one after the watch
  started.

Journey on this branch: every step passed with `--hooks-module`
(`woken` nudged, "turn closed, no watch running, the page reads
working") and without it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 6424f17 into main Oct 20, 2026
3 checks passed
@max-sixty
max-sixty deleted the fix-journey-woken-step branch October 20, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants