fix(vscode): bound sync filter state - #13417
Merged
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Previous Review Summary (commit 45695e6)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 45695e6)Status: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Reviewed by grok-4.6 · Input: 106.4K · Output: 8.4K · Cached: 154.9K Review guidance: REVIEW.md from base branch |
marius-kilocode
enabled auto-merge
August 25, 2026 12:49
marius-kilocode
disabled auto-merge
August 25, 2026 13:16
iscekic
reviewed
Aug 25, 2026
iscekic
left a comment
Collaborator
There was a problem hiding this comment.
Approved, ignorable bot remarks below
iscekic
approved these changes
Aug 25, 2026
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.
What Problem This Solves
The shared VS Code connection receives both normal live events and compatibility
syncenvelopes for several session, message, and message-part events. PR #13410 suppresses a matchingsyncenvelope after the same live event has been delivered.The first follow-up implementation introduced two edge cases in that tracking state:
Why This Change Was Made
Use a bounded sliding window for recently delivered live event IDs. When the 1,024-entry cap is reached, the oldest ID is evicted and the new live ID is tracked. Promptly arriving compatibility envelopes continue to be deduplicated. If an envelope arrives after its live ID has left the bounded window, it is forwarded instead of being incorrectly suppressed.
Create the filter inside
doConnect()so eachSdkSSEAdapterconnection has independent state. Reconnects and server restarts cannot reuse stale IDs.User Impact
The duplicate-event optimization continues to reduce downstream processing across the VS Code sidebar, editor tabs, and Agent Manager. Delayed or replay-only compatibility events remain deliverable, and reconnects do not carry stale deduplication state.
syncenvelopesynceventsession.updatedreconciliation envelopeEvidence