github / github/copilot-cli

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

Ouverte
#4,216 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

triage
Langage dominant
Shell
Étoiles
11.2k
Forks
1.9k
Merge moyen
14 h 16 min
PR mergées (30 j)
6

Description

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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par reproduire le problème avec les étapes indiquées pour le conteneur de développement SSH, en comparant l’initialisation de Chat et de Agent View et en vérifiant le répertoire de travail avec echo $PWD. Suivez l’endroit où Agent View établit son contexte d’exécution et comparez-le avec l’interface principale de Chat. La tâche est terminée lorsque Agent View s’exécute dans le conteneur et peut accéder à ses chemins, outils et dépendances, plutôt qu’à ceux de l’hôte.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
shell, vscode
Domaine
cli, devops, tooling
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.