microsoft / microsoft/vscode-docs
Document shell initialization for Copilot Agent Host sessions
Open
@ntrogh is already working on this.
Since Sep 2, 2026.
doc-enhancement
triage-needed
- Dominant language
- Markdown
- Stars
- 6.6k
- Forks
- 5.8k
- Avg merge
- 11h 43m
- Merged PRs (30d)
- 123
Description
Product change
- Source: https://github.com/microsoft/vscode/pull/332593
- Merged: 2026-09-02 UTC
Copilot Agent Host sessions can run a generated initialization script before each built-in shell command. The script loads the user's shell profile and can activate the Python environment selected for the workspace, so agent commands use the same environment as the developer.
Why the docs need an update
The Copilot harness documentation and AI settings reference do not mention the new initialization behavior, its opt-in setting, or the Python extension prerequisite.
Suggested documentation
docs/agents/run/agent-harnesses.md: explain when shell initialization is useful and what is loaded on each platform.docs/agents/reference/ai-settings.md: addchat.agentHost.shellTool.initScript.enabledwith its default, scope, and prerequisites.
Details to verify
chat.agentHost.shellTool.initScript.enabledis application-scoped, experimental/advanced, and defaults tofalse.- It applies only to local Copilot SDK Agent Host sessions that use the SDK shell tool.
- It loads
~/.bashrcon macOS and Linux and current-user PowerShell profiles on Windows. - Python activation requires the Python Environments extension and
python-envs.terminal.autoActivationTypeset toshellStartup.
Acceptance criteria
- Users can enable shell initialization and understand which sessions and platforms it affects.
- Python environment activation prerequisites and the default-off experimental status are explicit.
- The settings reference and Copilot harness guidance remain consistent.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.