Commit a44ba21
fix: prevent tool-pair summarization from being silently undone (#7413)
Two changes that fix a conversation state desync between server and UI:
1. Emit HistoryReplaced at end of agent loop iterations where conversation
was mutated, so the UI stays in sync with server-side metadata changes
(e.g. tool-pair summarization marking messages agent-invisible).
2. Stop sending conversation_so_far on normal chat turns. The server
already has the authoritative conversation in its DB. Sending it back
from the UI created a window where stale client state could overwrite
server-side changes. Edit-in-place flow (onMessageUpdate) is unchanged.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 717d17a commit a44ba21
2 files changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1617 | 1617 | | |
1618 | 1618 | | |
1619 | 1619 | | |
| 1620 | + | |
1620 | 1621 | | |
1621 | 1622 | | |
1622 | 1623 | | |
1623 | 1624 | | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
1624 | 1634 | | |
1625 | 1635 | | |
1626 | 1636 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
590 | 590 | | |
591 | 591 | | |
592 | 592 | | |
593 | | - | |
594 | 593 | | |
595 | 594 | | |
596 | 595 | | |
| |||
0 commit comments