Devcontainers in monorepo aren't being identified

We have a monorepo with devcontainer config which looks like below

It works as expected (prompts us asking for which devcontainer) when we use ms-vscode-remote.remote-containers

But when we use anysphere.remote-containers, it fails with an errors like

ailed to connect to the remote extension host server (Error: Invalid DevContainerDestination JSON: {"hostPath":"<path>","localDocker":false,"settings":{"context":"desktop-linux"},"configFile":{"$mid":1,"fsPath":"<path>/.devcontainer/mlai/devcontainer.json","path":"<path>/.devcontainer/mlai/devcontainer.json","scheme":"file"}})

or

No devcontainer.json files found. Please define the devcontainer in '.devcontainer/devcontainer.json'

Thanks for sharing this request – let me see about adding a picker like that in when there are multiple dev container files to pick from.

Link to spec: Development Container Specification

1 Like

I believe the first error (Invalid DevContainerDestination...) happens when opening a window from the recent windows list that was previously configured via the VSCode dev containers extension. Our serialization format (for the history) is slightly different, so it’ll only work for folders that were opened originally through the Anysphere extension.

Re: the 2nd issue with the devcontainer.json file being in an alternative location, version 1.0.4 of our extension should show a picker when running the “Reopen in Container” command. Could you upgrade to that version and give it another go? Thanks so much for bringing this up.

1 Like

There is also a problem when I raise the container in cursore using Dev Containers(Anysphere), but when I launch in Vsc(ms-vscode-remote) there is no such problem. Use ver. 1.0.6

2025-06-14 17:20:24.025 [error] Error resolving dev container authority [devcontainer up] Command failed with exit code 1: stdout: {"outcome":"error","message":"Command failed: /bin/sh -c find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' + 2>/dev/null && yarn install &&  yarn workspace st-tests docker:global:setup","description":"postCreateCommand from devcontainer.json failed.","containerId":"b6d4c3eee02cb64edc17ca6b1c19969d28c60993e2e3e66ceb65e70cb60500e7"}