Skip to content

fix(agent-manager): use valid terminal close code - #13416

Merged
marius-kilocode merged 1 commit into
mainfrom
validate-13413-luna-fast
Aug 25, 2026
Merged

fix(agent-manager): use valid terminal close code#13416
marius-kilocode merged 1 commit into
mainfrom
validate-13413-luna-fast

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

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.

@kilo-code-bot

kilo-code-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • .changeset/terminal-replay-close-code.md
  • packages/kilo-vscode/tests/unit/agent-manager-terminal-layout.test.ts
  • packages/kilo-vscode/webview-ui/agent-manager/terminal/TerminalTab.tsx

Reviewed by grok-4.6 · Input: 94.6K · Output: 4.3K · Cached: 179.8K

Review guidance: REVIEW.md from base branch main

@iscekic iscekic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, ignorable bot remarks below

@marius-kilocode
marius-kilocode merged commit 52bf546 into main Aug 25, 2026
24 checks passed
@marius-kilocode
marius-kilocode deleted the validate-13413-luna-fast branch August 25, 2026 14:24
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.

3 participants