fix(agent-manager): use valid terminal close code - #13416
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by grok-4.6 · Input: 94.6K · Output: 4.3K · Cached: 179.8K Review guidance: REVIEW.md from base branch |
marius-kilocode
enabled auto-merge
August 25, 2026 12:48
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
WebReflection
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.
Follow-up to #13413.
What Problem This Solves
The terminal replay overflow path passed close code 1009 to the browser WebSocket API. Chromium rejects that code synchronously, so the overflow socket was not closed.
Why This Change Was Made
The WebSocket API accepts 1000 or application-defined codes from 3000 through 4999. Code 4009 preserves the overflow-specific intent while remaining valid in Chromium.
User Impact
Oversized terminal replay now closes the socket instead of throwing from the message handler.
Evidence
A live WebSocket message test in VS Code 1.134.0 (Chrome 148.0.7778.280) reproduced InvalidAccessError for 1009 and accepted 4009. The focused Agent Manager replay and layout tests pass.