agentHost: set non-interactive env vars for tool-triggered terminals#311473
Merged
connor4312 merged 2 commits intomainfrom Apr 20, 2026
Merged
agentHost: set non-interactive env vars for tool-triggered terminals#311473connor4312 merged 2 commits intomainfrom
connor4312 merged 2 commits intomainfrom
Conversation
Inspired by what Codex does, but allows for colors since we can display those. I think `TERM=dumb` is not strictly needed, but it should make it less likely for tools to try to do things that would need complex interaction which is probably a good thing.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a “non-interactive” mode for agent-host terminals created for tool-triggered shells, by plumbing a new nonInteractive option through the terminal manager and enabling it for Copilot tool shells.
Changes:
- Extend
IAgentHostTerminalManager.createTerminalwith anonInteractive?: booleanoption. - When
nonInteractiveis enabled, set several environment variables intended to suppress paging/prompts and normalize output. - Enable
nonInteractivefor tool-triggered shells created byShellManager.
Show a summary per file
| File | Description |
|---|---|
src/vs/platform/agentHost/node/copilot/copilotShellTools.ts |
Enables nonInteractive when creating tool shells. |
src/vs/platform/agentHost/node/agentHostTerminalManager.ts |
Adds nonInteractive option and applies environment overrides when set. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 4
DonJayamanne
approved these changes
Apr 20, 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.
Inspired by what Codex does, but allows for colors since we can display those. I think
TERM=dumbis not strictly needed, but it should make it less likely for tools to try to do things that would need complex interaction which is probably a good thing.