fix(vscode): keep concurrent Agent Manager streams responsive#11033
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge The change is surgical and correct. The removed four lines extracted the event type solely for a Files Reviewed (3 files)
Reviewed by claude-4.6-sonnet-20260217 · 368,674 tokens Review guidance: REVIEW.md from base branch |
imanolmzd-svg
approved these changes
Jun 9, 2026
chrarnoldus
approved these changes
Jun 9, 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.
Agent Manager receives every CLI SSE event through the VS Code extension host. The SSE adapter also logged every non-heartbeat event, including high-frequency
message.part.deltatraffic. With several sessions running concurrently, one line of diagnostic logging became one additional extension-host console message for every stream event. VS Code then serialized and forwarded those messages to the renderer alongside the actual Agent Manager updates.This removes only the per-event log from the SSE hot path. Connection, reconnect, heartbeat timeout, shutdown, and error diagnostics remain available. Event delivery, foreground/background scheduling, and inactive-session state updates are unchanged. A regression test drives 100 events through the adapter and verifies that all events are delivered without producing an event log for each one.
Measured impact
The before and after captures used the same Agent Manager scenario:
ScriptDurationTaskDurationThe most direct result is that the webview spends roughly half as much traced time running JavaScript during concurrent streaming, while the overall renderer process uses about 11% less time. The foreground responsiveness signal also improves: the worst observed scheduling gap falls below one 60 Hz frame interval plus normal timer variance, and no gap exceeds 32 ms after the change.
The reduction in Mojo messages and renderer tasks confirms that this was not only console formatting cost inside Node.js. Removing the log also avoids transporting and processing those messages through VS Code's extension-host logging pipeline.
These figures describe this four-session steady-state workload rather than a universal percentage for every machine or model. The benefit scales with SSE event volume: a single idle session sees little difference, while multiple token and tool streams avoid one console message per incoming event.
The remaining profile cost is primarily webview style recalculation and paint from large live transcripts, plus normal background-session store processing. Those are separate rendering concerns and are intentionally unchanged here to avoid stale inactive tabs or delayed tool state.