Skip to content

Hold a steered Claude Code turn open through task-notification results - #7396

Merged
ymichael merged 1 commit into
mainfrom
claude-code-hold-turn-through-task-notifications
Nov 11, 2026
Merged

ymichael merged 1 commit into
mainfrom
claude-code-hold-turn-through-task-notifications

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

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_uuids each result reports. A background task's notification turn (origin: task-notification) ends with a result that has no user_message_uuids list 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:

  • A result whose origin isn't a person no longer touches the pending-prompt bookkeeping.
  • Such a result keeps the turn open while prompts are pending, but only once this session's CLI has reported consumed prompts at least once (promptConsumptionReported). With a CLI that never reports them, behaviour is unchanged.
  • The existing "human origin" check is shared through isHumanOriginResult.

No server, wire or protocol change.

How you verified

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.

AGENT GENERATED

🤖 Generated with Claude Code

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
ymichael merged commit 4983aef into main Nov 11, 2026
35 checks passed
@ymichael
ymichael deleted the claude-code-hold-turn-through-task-notifications branch November 11, 2026 04:28
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.

1 participant