Skip to content

agentHost: set non-interactive env vars for tool-triggered terminals#311473

Merged
connor4312 merged 2 commits intomainfrom
connor4312/terminal-nointeract
Apr 20, 2026
Merged

agentHost: set non-interactive env vars for tool-triggered terminals#311473
connor4312 merged 2 commits intomainfrom
connor4312/terminal-nointeract

Conversation

@connor4312
Copy link
Copy Markdown
Member

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.

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.
Copilot AI review requested due to automatic review settings April 20, 2026 20:07
@connor4312 connor4312 self-assigned this Apr 20, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.createTerminal with a nonInteractive?: boolean option.
  • When nonInteractive is enabled, set several environment variables intended to suppress paging/prompts and normalize output.
  • Enable nonInteractive for tool-triggered shells created by ShellManager.
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

Comment thread src/vs/platform/agentHost/node/agentHostTerminalManager.ts Outdated
Comment thread src/vs/platform/agentHost/node/agentHostTerminalManager.ts Outdated
Comment thread src/vs/platform/agentHost/node/agentHostTerminalManager.ts Outdated
Comment thread src/vs/platform/agentHost/node/copilot/copilotShellTools.ts
@connor4312 connor4312 marked this pull request as ready for review April 20, 2026 20:47
@connor4312 connor4312 enabled auto-merge (squash) April 20, 2026 20:47
@connor4312 connor4312 merged commit dd50d09 into main Apr 20, 2026
26 checks passed
@connor4312 connor4312 deleted the connor4312/terminal-nointeract branch April 20, 2026 21:17
@vs-code-engineering vs-code-engineering bot added this to the 1.118.0 milestone Apr 20, 2026
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