Repository navigation
Hold a steered Claude Code turn open through task-notification results - #7396
Merged
Merged
Conversation
Task-notification results carry no user_message_uuids, so the translator treated them as coming from a CLI that does not report consumed prompts, dropped every pending steer and closed the turn. A prompt sent while a background-task notification turn was running then answered in a turn bb had already closed. Results not started by the user now leave the prompt bookkeeping alone, and hold the turn while steers are pending once the session's CLI has reported consumption. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
deleted the
claude-code-hold-turn-through-task-notifications
branch
November 11, 2026 04:28
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.
Human comments
What was wrong
#7321 keeps a Claude Code turn open while a prompt pushed into it hasn't been consumed yet, using the
user_message_uuidseach result reports. A background task's notification turn (origin: task-notification) ends with a result that has nouser_message_uuidslist at all. The translator read that as a CLI that never reports consumed prompts, so it cleared every pending steer and closed the bb turn. A message sent while the notification turn was running was then answered in a turn bb had already closed, and every following reply answered the previous message, which is the drift #7321 fixed for ordinary steers. Found by #7321's review; main behaves the same, so this was a gap in #7321 rather than a regression.What changed
plugins/provider-claude-code/src/delta-translation.ts:promptConsumptionReported). With a CLI that never reports them, behaviour is unchanged.isHumanOriginResult.No server, wire or protocol change.
How you verified
bridge.test.ts) and passes with the fix.pnpm exec turbo run typecheck lint --filter=bb-plugin-provider-claude-codeand the bridge test file pass on this branch, which is the fix cherry-picked onto main after Keep a Claude Code turn open until the SDK has run every steer pushed into it #7321 merged.sleep 4and steer during the notification turn. On Keep a Claude Code turn open until the SDK has run every steer pushed into it #7321, rounds 3–5 drifted (the turn holding "ROUND 3 TURN" showed the notification's answer and closed, and the real answer arrived as an unprompted turn). With the fix, every message was answered inside the turn that accepted it. The plain steer-race check also passed 6 of 6 rounds.Not covered here: a turn that fails while a steer is pending still stays open and can later end as
completed. That was reproduced live separately and is not fixed by this PR.🤖 Generated with Claude Code