Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

fix(client): deduplicate user messages on history replay#183

Merged
91jaeminjo merged 1 commit into
mainfrom
fix/agent-history-duplicate-messages
Mar 27, 2026
Merged

fix(client): deduplicate user messages on history replay#183
91jaeminjo merged 1 commit into
mainfrom
fix/agent-history-duplicate-messages

Conversation

@91jaeminjo
Copy link
Copy Markdown
Collaborator

Summary

Fixes soliplex/frontend#33

  • _extractUserMessageEvents now only synthesizes events for the last user message per run (the one that initiated the run), instead of all user messages in run_input.messages
  • _processTextEnd skips appending when a message with the same ID already exists (idempotency guard with developer.log warning)

Test plan

  • Regression test: 3-run history with accumulating run_input.messages produces exactly 6 messages (not 9)
  • Idempotency test: duplicate message ID is skipped, original preserved
  • Updated fallback values test for new last-user-message semantics
  • Full suite: 1199 tests passing, 0 analyzer issues

🤖 Generated with Claude Code

_extractUserMessageEvents now only synthesizes events for the last user
message per run (the initiating one), and _processTextEnd skips appending
when a message with the same ID already exists in the conversation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@91jaeminjo 91jaeminjo merged commit 9f4b6e9 into main Mar 27, 2026
7 checks passed
@91jaeminjo 91jaeminjo deleted the fix/agent-history-duplicate-messages branch March 27, 2026 16:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AG-UI event processor appends duplicate messages on history replay

1 participant