Agent Host missing non-PTY shell output after completion #327555
Merged
Merged
Agent Host missing non-PTY shell output after completion #327555
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes missing completed non-PTY shell output by handing rendering from the live source to its retained snapshot.
Changes:
- Detaches finalized live output before completion rendering.
- Preserves empty non-PTY snapshots.
- Adds lifecycle, ordering, and PTY-shape coverage.
Show a summary per file
| File | Description |
|---|---|
agentHostSessionHandler.ts |
Implements the live-to-retained output handoff. |
stateToProgressAdapter.ts |
Preserves explicit empty non-PTY snapshots. |
agentHostChatContribution.test.ts |
Tests attachment disposal and completion ordering. |
stateToProgressAdapter.test.ts |
Tests empty non-PTY and omitted-isPty behavior. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Medium
anthonykim1
marked this pull request as ready for review
July 27, 2026 00:13
anthonykim1
enabled auto-merge (squash)
July 27, 2026 00:21
justschen
approved these changes
Jul 27, 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.
Resolves: #327556
(Seems like race condition) - On fast commands like
ls in terminal- there is issue where output goes missing "only on UI" for completed non-pty shell output.This PR does not change runtime preview truncation behavior.
isPtyis omitted.Verification
npm run typecheck-client -- --pretty falsenpm run test-browser-no-install -- --browser chromium --sequential --run src/vs/workbench/contrib/chat/test/browser/agentSessions/stateToProgressAdapter.test.jsnpm run test-browser-no-install -- --browser chromium --sequential --run src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.jsInspirations from:
CopilotNonPtyShellTerminals.getCommandOutputSnapshot.isPty, while non-PTY blocks explicitly setisPty: falseinCopilotAgentSession.ChatTerminalToolProgressPartand_updateTerminalContent.