github / github/copilot-cli

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

Aperta
#4,216 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

triage
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

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/<name>/...) 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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Iniziate riproducendo il problema con i passaggi elencati per il container di sviluppo SSH, confrontando l’inizializzazione di Chat e Agent View e verificando la directory di lavoro con echo $PWD. Tracciate dove Agent View stabilisce il proprio contesto di esecuzione e confrontatelo con l’interfaccia principale di Chat. L’attività è completata quando Agent View viene eseguito nel container e può accedere ai relativi percorsi, strumenti e dipendenze anziché a quelli dell’host.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
shell, vscode
Ambito
cli, devops, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.