github / github/copilot-cli

Agent View ignores remote container context when workspace is opened in ssh dev container

Abierto
#4,216 0 comentarios 0 reacciones 0 asignados Ver en GitHub
triage
Lenguaje dominante
Shell
Estrellas
11.2k
Forks
1.9k
Merge medio
14 h 16 min
PR fusionados (30 d)
6

Descripción

### Describe the bug

## Description

When a VS Code workspace is opened in a remote SSH dev container, the new Copilot Agent View incorrectly initializes on the host system instead of inside the container, ignoring the remote context that the main Chat interface correctly respects.

## Expected Behavior

- Workspace opened in dev container → Chat works correctly in container
- New Agent View opened → should also run in the same container context
- Both interfaces should respect the remote container environment

## Actual Behavior

- Workspace opened in dev container → Chat works correctly in container
- New Agent View opened → **starts on the host system instead of the container**
- Agent has file system access to the host (e.g., `/Users//...`) instead of container paths
- This creates a context mismatch and prevents proper interaction with container-specific tools/dependencies

## Environment

- OS: macOS (Darwin)
- Workspace: SSH remote dev container
- VS Code: Remote - Containers extension enabled
- Copilot CLI: Latest version

## Impact

- Agent cannot access container-specific dependencies/tools
- Workspace context is fragmented between Chat (container) and Agent (host)
- Potential security/privacy issue: agent operates on host file system when it shouldn't

## Suggested Fix

Agent View should automatically detect and respect the VS Code remote context (dev container, SSH, WSL, etc.) on initialization, matching the behavior of the main Chat interface.

### Affected version

latest

### Steps to reproduce the behavior

1. Open a project in a dev container (e.g., via Remote - Containers extension)
2. Verify Chat interface works correctly in container
3. Open Agent View (or new agent session)
4. Check working directory/system info: `echo $PWD` or equivalent
5. **Observe:** Agent is on host system, not in container

### Expected behavior

- Workspace opened in dev container → Chat works correctly in container
- New Agent View opened → should also run in the same container context
- Both interfaces should respect the remote container environment

### Additional context

_No response_

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comience reproduciendo el problema con los pasos indicados del contenedor de desarrollo SSH, comparando la inicialización de Chat y Agent View y comprobando el directorio de trabajo con `echo $PWD`. Rastree dónde Agent View establece su contexto de ejecución y compárelo con la interfaz principal de Chat. La tarea está terminada cuando Agent View se ejecuta en el contenedor y puede acceder a sus rutas, herramientas y dependencias, en lugar de a las del host.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
shell, vscode
Área
cli, devops, tooling
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.