Repository navigation
Set AI_AGENT env var for agent terminals - #320129
Merged
Megan Rogge (meganrogge) merged 1 commit intoJun 5, 2026
Merged
Conversation
Adopt the cross-vendor 'AI_AGENT=github_copilot_vscode_agent' env var on agent-initiated terminals. Keeps COPILOT_AGENT=1 for back-compat with CLIs that already adopted it. Fixes microsoft#320127
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Anthony Kim (@anthonykim1)Matched files:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the environment passed to agent-initiated (Copilot tool) terminals to include the cross-vendor AI_AGENT=github_copilot_vscode_agent marker, while retaining COPILOT_AGENT=1 for backwards compatibility with existing tooling.
Changes:
- Add
AI_AGENT=github_copilot_vscode_agentto the env set for agent terminals. - Keep
COPILOT_AGENT=1alongside the new variable for compatibility.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.ts | Adds AI_AGENT env var (and documents back-compat with COPILOT_AGENT) for agent-created terminals. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
Michael Lively (Yoyokrazy)
approved these changes
Jun 5, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Adopts the cross-vendor
AI_AGENT=github_copilot_vscode_agentenvironment variable on agent-initiated terminals.COPILOT_AGENT=1is kept alongside it for back-compat with CLIs that already adopted it.Fixes #320127