You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Agent View ignores remote container context when workspace is opened in ssh dev container #4216
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
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
Open a project in a dev container (e.g., via Remote - Containers extension)
Verify Chat interface works correctly in container
Open Agent View (or new agent session)
Check working directory/system info: echo $PWD or equivalent
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
Activity