Skip to content

Document shell initialization for Copilot Agent Host sessions #10230

Description

@ntrogh

Product change

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: add chat.agentHost.shellTool.initScript.enabled with its default, scope, and prerequisites.

Details to verify

  • chat.agentHost.shellTool.initScript.enabled is application-scoped, experimental/advanced, and defaults to false.
  • It applies only to local Copilot SDK Agent Host sessions that use the SDK shell tool.
  • It loads ~/.bashrc on macOS and Linux and current-user PowerShell profiles on Windows.
  • Python activation requires the Python Environments extension and python-envs.terminal.autoActivationType set to shellStartup.

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions