Skip to content

Copilot run_in_terminal sandbox dependency installer is hardcoded to apt, breaks on Arch/Linux non-Debian distros #323541

Description

@zdeyn

Context

Using Copilot Chat terminal tools on Arch Linux with sandboxed execution enabled.

Problem

When the terminal tool enters the sandbox dependency install/remediation flow, it attempts to run:

sudo apt install -y <deps>

On Arch (and other non-Debian distros), this fails because apt is not available. The user-facing result is:

Sandbox dependency installation failed (exit code ...). The command was not executed.

Repro

  1. On Arch Linux, ensure bwrap and socat are installed (for example via pacman).
  2. Use Copilot Chat terminal tool (run_in_terminal) with sandboxed execution flow enabled.
  3. Trigger a path that invokes missing dependency installation/remediation.
  4. Observe attempted use of apt and failure.

Expected

Dependency installation/remediation should be distro-aware (e.g. pacman on Arch, dnf on Fedora, zypper on openSUSE, etc.), or avoid shelling out to distro package managers directly and instead provide actionable instructions.

Actual

Installer command is hardcoded to apt.

Source reference

In src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.ts, installMissingSandboxDependencies(...) currently uses:

sudo apt install -y ${depsList}

This appears to be the root cause for Linux distro mismatch.

Suggestion

  • Detect distro/package manager at runtime and choose appropriate command.
  • If unsupported/unknown distro, surface a targeted prompt with a copyable command suggestion instead of assuming apt.
  • Optionally allow a configurable package install command for enterprise/custom environments.

Thanks!

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionality

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions