Skip to content

fix(acp): stop emitting user_message_chunk during session/prompt turn#21851

Open
RAIT-09 wants to merge 2 commits intoanomalyco:devfrom
RAIT-09:fix/acp-suppress-user-message-chunk-on-prompt
Open

fix(acp): stop emitting user_message_chunk during session/prompt turn#21851
RAIT-09 wants to merge 2 commits intoanomalyco:devfrom
RAIT-09:fix/acp-suppress-user-message-chunk-on-prompt

Conversation

@RAIT-09
Copy link
Copy Markdown

@RAIT-09 RAIT-09 commented Apr 10, 2026

Issue for this PR

Closes #21708

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Removes the user_message_chunk emission from the live message.part.updated handler during session/prompt turns.

Per the ACP spec, user_message_chunk should only be sent during session/load or session/fork to replay conversation history. #18625 added this emission on the live prompt path to align output between live and replay paths, but ACP clients already know the message they sent — the echo causes duplicate display.

This change only affects the live prompt path. session/load and session/fork replay behavior is unchanged.

How did you verify your code works?

  • Connected to the patched build via Obsidian Agent Client and Zed Editor over ACP
  • Confirmed user messages are no longer duplicated on prompt
  • Confirmed session/load still correctly replays full conversation history including user messages
  • typecheck passes, existing tests pass

Screenshots / recordings

Before:
image
image

After:
image

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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.

ACP: user_message_chunk incorrectly emitted during session/prompt turn

1 participant