Skip to content

Record that an interrupted tool boundary delivers a comment twice - #3599

Merged
leaf-agent merged 1 commit into
mainfrom
todo-duplicate-delivery
Oct 22, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
todo-duplicate-delivery

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

This adds a TODO entry for a follow-up to Max's decision #2 on the overnight report (#3591). After an interrupted tool boundary, #3591's re-offer delivers a comment twice.

#3591 offers a Claude Code handover again once its turn ends with no later hook. That is right for the prompt hook, where Escape drops the prompt and Leaf's context with it. On Claude Code 2.1.308, though, Escape during PostToolBatch's hooks keeps Leaf's context in the conversation. In one leaf-dev journey claude-code run (its boundary step), the transcript held the comment in both the PostToolBatch context and the nudged turn's prompt context, and the agent wrote that it "came in twice". A turn interrupted after the model read a prompt's delivery, but before any confirming hook ran, gets that delivery twice as well.

The entry records the finer fix: offer an update again only when a prompt hook handed it over, and after an interrupted tool boundary remind the agent of what it owes instead. No code changes.

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

@leaf-agent
leaf-agent merged commit c0d6f04 into main Oct 22, 2026
3 checks passed
@leaf-agent
leaf-agent deleted the todo-duplicate-delivery branch October 22, 2026 19:51
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