Skip to content

AgentHost: Dev Containers support #317380

Closed
Closed

Description

@roblourens

We should support projects in WSL and Dev Containers, in some way, maybe similarly to how remote AH work with SSH.

Activity

  1. self-assigned this
    on May 19, 2026
  2. added
    feature-request
    agent-host
    on May 19, 2026
  3. youhogeon commented on May 28, 2026

    @youhogeon

    Regarding this issue, our organization is debating whether we should completely phase out our dev containers-based development environment and build a new one, or wait for this issue to be resolved.

    (I know this is a very difficult question, but nevertheless)
    I would appreciate it if you could share a rough roadmap for this feature.

    I’m curious if there’s a chance it will be included in the next N releases (where N is a small integer),
    or if we should look further into the future.

    As a big fan of Microsoft and VSCode, I’m always grateful.

  4. johngladp commented on May 28, 2026

    @johngladp

    Full dev-container integration in the Agents Windows is essential to my workflow - the tool is unusable without this for me.

    I need this to work via SSH and WSL2 as well.

    Expected workflow:

    New Session in -> SSH -> Open in Devcontainer.
    Why:

    Windows VSCode host
    Linux development either via a remote VM over SSH or WSL2
    The remote is a minimal setup, it can't build the projects, all the project tooling is installed into devcontainers.
    I was surprised by this HUGE omission, especially given the most recent Agents demo video demonstrated HTML updates to the devcontainer documentation! https://code.visualstudio.com/assets/docs/copilot/agents-window/agents-demo-20260510.mp4

    Image

    Hopefully this will be on a backlog and in a release very soon.

  5. elkanatovey commented on Jun 16, 2026

    @elkanatovey

    Hit a connection failure from the agents window to a WSL distro that traces back to agent-host server-version resolution:

    Failed to connect to WSL distribution '<distro>': Client offered protocol versions [0.4.0], none of which are compatible with this server's version 0.3.0 (server accepts ^0.3.0).
    

    Root cause: the agent host resolves quality Stable against the public update channel and downloads the channel-latest server, instead of pinning to the client''s exact commit (the way Remote-WSL does).

    Concrete versions in my repro:

    • Client / app: VS Code 1.125.0, commit 93cfdd489c3b228840d0f86ec77c3636277c93ea (product.json quality=stable) -> speaks AgentHost protocol 0.4.0.
    • Agent host log: Resolved quality Stable to 6928394f... -> 1.124.2 server -> protocol 0.3.0.
    • Public Stable channel latest server is still 1.124.2 (6928394f...), i.e. the app build is ahead of the channel.
    • Editor Remote-WSL connects fine to the same distro, because it fetches the client''s exact commit 93cfdd48 (present at ~/.vscode-server/bin/93cfdd48...), not "latest stable".
    • Reproduces on both Ubuntu and AzureLinux3; wsl --shutdown does not help (re-downloads the same 1.124.2).

    Impact: affects anyone whose VS Code build is ahead of the public-channel agent-host server — internal/dogfood builds, and (briefly) all users during each Stable release rollout window.

    Suggested fix: have the WSL agent host pin to the client''s commit/quality (same as Remote-WSL), or negotiate a compatible protocol / surface the "update agent host" flow when the deployed host is older than the client.

    Workaround: copy the client-commit server over the cached agent-host server:

    S=~/.vscode-server/cli/servers/Stable-6928394f91b684055b873eecb8bc281365131f1c/server
    cp -a ~/.vscode-server/bin/93cfdd489c3b228840d0f86ec77c3636277c93ea "$S.new" && mv "$S" "$S.bak" && mv "$S.new" "$S"
  6. kumarshaz commented on Jun 16, 2026

    @kumarshaz

    I use VS Code with WSL Ubuntu. I can use VS Code Copilot chat and CLI without any issue. However, when I open the new agent window from VS Code, I see all the language servers fails to start. I also don't see any of my existing copilot sessions.

    Repro steps:
    Open VS Code with WSL Ubuntu remote connection and click on agent window link at top right corner.

    VS Code Agent Window on WSL:
    Was throuwing language server start error:
    couldn't create connection to server. Error: UNC host 'wsl$' access is not allowed at lstat (node:fs:1620:10) at t.lstat (node:electron/js2c/node_init:2:5035) at c:\Users\shashi.kumar\AppData\Local\Programs\Microsoft VS Code\ffa3c3f656\resources\app\extensions\json-language-features\client\dist\node\jsonClientMain.js:19:49494 at new Promise () at QT._getServerWorkingDir (c:\Users\shashi.kumar\AppData\Local\Programs\Microsoft VS Code\ffa3c3f656\resources\app\extensions\json-language-features\client\dist\node\jsonClientMain.js:19:49475) at QT.createMessageTransports (c:\Users\shashi.kumar\AppData\Local\Programs\Microsoft VS Code\ffa3c3f656\resources\app\extensions\json-language-features\client\dist\node\jsonClientMain.js:19:44240) at QT.createConnection (c:\Users\shashi.kumar\AppData\Local\Programs\Microsoft VS Code\ffa3c3f656\resources\app\extensions\json-language-features\client\dist\node\jsonClientMain.js:16:11289) at QT.start (c:\Users...Do a deep research on this issue and check if I need to enable a new setup or wait for a fix as per their issue log.

    Now when I open VS Code on Windows and then click on the AGent Window link at top right corner, the language server error disappears.

    Image (everything is fine)

    Now Open VS Code on remote WSL Ubuntu and load a different project, click on Agent WIndow button, the Language server errors disappears but shows the Old project opened in Windows remote, not the one Opened in WSL remote session. It looks like the agent window is always pointing to Windows local and not to WSL/remote. The Project loads properly when Opened the new workspace.

  7. 45 remaining items

  8. chrmarti commented on Sep 18, 2026

    @chrmarti
    Collaborator

    Rouke Broersma (@rouke-broersma) Dev Containers in WSL will be in today's VS Code Insiders build. Looking forward to feedback if you want to try it! It will become available in VS Code 1.139.0 next week if you prefer to wait for a stable release.

    ahernandez-youtopia Connecting to WSL (without Dev Container) should already work, could you open a bug report with logs and step to reproduce? Thanks!

  9. ricardo17coelho commented on Sep 18, 2026

    @ricardo17coelho

    Kenneth Redler (@kennethredler) I'm getting a fix in for the missing OS certificates.

    ricardo17coelho Jan Widmer (@janwidmer) Claude is currently not detected in the Dev Container. We need to clarify this in the UI and find a way to detect it (if the container is already up - not sure how we could do this ahead of time).

    Thanks!

    Christof Marti (@chrmarti)
    Will this also be supported soon?

  10. kumarshaz commented on Sep 21, 2026

    @kumarshaz

    Following up on my earlier comment (#317380 (comment)) — still reproducing on VS Code 1.138.0 (the milestone this issue was closed against) with WSL2 Ubuntu (latest).

    The Agents Window now opens the WSL workspace correctly, but the JSON Language Server and Code Spell Checker language clients still crash with:

    Error: UNC host 'wsl$' access is not allowed
    at lstat (node:fs:1620:10)
    ...
    at TT._getServerWorkingDir (jsonClientMain.js:28:36970)

    It looks like _getServerWorkingDir in these language clients isn't yet routed through the agent-host's WSL connection. #316537 Is Open where I have added the comment. Should I be following up on that bug or continue to follow up on this?

  11. rouke-broersma commented on Sep 23, 2026

    @rouke-broersma

    Rouke Broersma (@rouke-broersma) Dev Containers in WSL will be in today's VS Code Insiders build. Looking forward to feedback if you want to try it! It will become available in VS Code 1.139.0 next week if you prefer to wait for a stable release.

    ahernandez-youtopia Connecting to WSL (without Dev Container) should already work, could you open a bug report with logs and step to reproduce? Thanks!

    Hi, I'm trying it out in insider. I have multiple devcontainer definitions in my project separated by folders, this is not currently recognized by the agent window. This is supported by the vscode devcontainers extension: https://code.visualstudio.com/remote/advancedcontainers/connect-multiple-containers
    Note I am only referring to the part of the doc about multiple devcontainer definitions, not the part about spinning up multiple containers at the same time. I don't need that capability.

    Folders is the only way to specify multiple devcontainer definitions as the file must be called devcontainer.json. If this could also be supported that would be great. For now I will move the devcontainer I am trialiing to the root of .devcontainer.

  12. rouke-broersma commented on Sep 23, 2026

    @rouke-broersma

    One weird thing I'm seeing is that all models are in triplicate:

    Image

    This seems to come from three layers of copilot installation when using dev containers in WSL?:

    Image

    Actually quadruple, as apparently I now also have Codex from somewhere contributing the same models once again:

    Image
  13. jhkn-rcq commented on Sep 23, 2026

    @jhkn-rcq

    I see a related issue in VS Code 1.139.0 on Windows with a WSL remote
    workspace (Ubuntu-26.04).

    chat.agentHost.devContainer.enabled is enabled and the selected workspace is
    a configured WSL folder. The repository has .devcontainer/devcontainer.json.

    The WSL host uses Podman 5.7.0 with podman-docker:

    • docker --version succeeds
    • docker info succeeds
    • docker ps succeeds and shows the running dev container

    However, in the Agents Window workspace picker, the remote WSL folder menu does
    not offer Use Dev Container at all. I have attached screenshots of the
    selected rcs-bo-ci [Ubuntu-26.04] workspace and its folder menu.

    Is Podman via the Docker-compatible CLI expected to be supported for Agent Host
    Dev Container sessions, or is this a capability-detection bug?

    Image
  14. solomatov commented on Sep 23, 2026

    @solomatov
    Contributor

    Is there any way to connect to an attached container?

  15. rouke-broersma commented on Sep 23, 2026

    @rouke-broersma

    Joost Hakkennes (@jhkn-rcq) it's very much not intuitive but I think it may be available for you. You need to go to Chat > and there if correctly configured you can choose between remote host (WSL) or devcontainer

    Image
  16. jhkn-rcq commented on Sep 23, 2026

    @jhkn-rcq

    Rouke Broersma (@rouke-broersma)
    I don't see the Local Github Remote as seen in your screenshot and there is no submenu under de Ubuntu WSL options. You are right. It isn't intuitive at all.

    Image
  17. rouke-broersma commented on Sep 23, 2026

    @rouke-broersma

    Joost Hakkennes (@jhkn-rcq) I think those tabs only appeared after I first connect to WSL as remote workspace. However it could also be incompatibility with podman. Do you have the docker socket available? It was listed as a requirement above.

  18. jhkn-rcq commented on Sep 24, 2026

    @jhkn-rcq

    Rouke Broersma (@rouke-broersma) After a restart of my laptop this morning it seems to work.
    Image

    On my WSL I added docker compatibility for podman:

    sudo apt update
    sudo apt install podman-docker
    

    In my user setting from the agents window

    "chat.agentHost.devContainer.enabled": true,
    "chat.remoteAgentHostsEnabled": true,
    "dev.containers.dockerPath": "podman",

    After a restart of WSL this did the trick.

  19. jochemfranken commented on Sep 29, 2026

    @jochemfranken

    I'm able to set the "Use dev container" option as shown in the image above, but I get an error when giving the first prompt:

    [2026-09-29T13:16:24.249Z] Stop (25 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/jochem/projects/myproject
    [2026-09-29T13:16:24.250Z] Dev container not found.
    [2026-09-29T13:16:24.252Z] Error: Dev container not found.
        at Ng (/home/jochem/.vscode-server/cli/servers/Stable-04c0d99f4fb0d8afe6ce4f0c58e31e183ac3e4b1/server/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:473:1484)
        at ou (/home/jochem/.vscode-server/cli/servers/Stable-04c0d99f4fb0d8afe6ce4f0c58e31e183ac3e4b1/server/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:672:6405)
        at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
        at async N5 (/home/jochem/.vscode-server/cli/servers/Stable-04c0d99f4fb0d8afe6ce4f0c58e31e183ac3e4b1/server/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:672:3985)
        at async /home/jochem/.vscode-server/cli/servers/Stable-04c0d99f4fb0d8afe6ce4f0c58e31e183ac3e4b1/server/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:486:1917
    

    Somewhat above it are these lines, showing docker can be found/reached:

    [2026-09-29T13:20:35.306Z] github.com/docker/buildx v0.30.0 124418cd66f056c2b1111f173c3f48fa695a089e
    [2026-09-29T13:20:35.306Z] 
    [2026-09-29T13:20:35.306Z] Start: Run: docker -v
    [2026-09-29T13:20:35.320Z] Stop (14 ms): Run: docker -v
    [2026-09-29T13:20:35.320Z] Start: Run: docker version --format {{.Server.Version}}
    [2026-09-29T13:20:35.337Z] Stop (17 ms): Run: docker version --format {{.Server.Version}}
    [2026-09-29T13:20:35.337Z] 29.0.0
    

    Anyone having the same issues?

  20. rene-deltares commented on Oct 11, 2026

    @rene-deltares

    I have the "chat.agentHost.devContainer.enabled": true and also the "chat.agentHost.devContainer.samples.enabled": true lines in my user settings. Strangely, I can open the "python dev container sample" just fine. But I haven't been able to connect my own project in the devcontainer in the 'AgentHost' mode. It has a the .devcontainer/delft3d/devcontainer.json file, which regular vscode has no trouble recognising.

    I can select folders in my windows drive, and my WSL distribution. But I can't find any option to connect the agent to my devcontainer. I've been waiting for exactly this feature to try out the agent mode, and I've attempted already three times to get this working. Here's what my agent window looks like currently:

    I'm running Windows with WSL. The devcontainer is working just fine when using regular vscode. I have docker desktop installed, and I'm able to use docker in my Ubuntu WSL distribution. I'm currently on vscode version 1.141.0

    Image
  21. jhkn-rcq commented on Oct 12, 2026

    @jhkn-rcq

    René van Klink (@rene-deltares)

    After changing the user settings you have to restart WSL once. (wsl --shutdown)

    "chat.agentHost.devContainer.enabled": true,
    "chat.remoteAgentHostsEnabled": true,
    \\"dev.containers.dockerPath": "podman",
    

    In the agents window klik on "Ubuntu" and navigate to your project to open it in WSL modus.
    Then go back to the project selector and now a new submenu apears to switch to the Dev Container.

    It doesn't work when you open the project with the windows path like \\wsl.localhost\*
    You have to open the WSL variant first with the path like /home/ and then switch to the devcontainer.

    It works with docker and podman as well. For podman you have to set the extra "dev.containers.dockerPath": "podman" setting in the user settings.

    Image
  22. rene-deltares commented on Oct 12, 2026

    @rene-deltares

    Thanks Joost Hakkennes (@jhkn-rcq), in the end it turned out to be something else, but I got it working now!

    It turned out it was not an issue with the settings or an issue with opening the folder in WSL at all. Agent mode just didn't recognise the devcontainer settings in our repository. My devcontainer.json is in this location relative to the repo root: .devcontainer/delft3d/devcontainer.json.

    I basically did a cp -R .devcontainer/delft3d/ ./devcontainer/, and was instantly presented with that Use Remote Host/Dev Container selection box.

    At the time we made this configuration we were thinking that maybe we maybe needed separate devcontainer configurations in the future to support different toolchains, hence the /delft3d/ subfolder. This is allowed according to the devcontainer spec: https://containers.dev/implementors/spec/#devcontainerjson

    Should I report a bug? The subfolders in .devcontainer/ are allowed in the spec and in regular vscode the settings in the subfolders are recognised.

    UPDATE: I created an issue here: #341012

    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

WSLagent-hostagents-windowcontainersfeature-requeston-testplan

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions