Cannot open devcontainers anymore from WSL

Describe the Bug

Cursor fails to open devcontainer projects located on WSL.
This started happening when cursor started prompting me to install anysphere.remote-containers.

When opening the project in WSL and then follow the prompt suggesting to open this project using dev containers, I get the following error:

2025-07-22 08:25:09.003 [info] Spawned process 8880: 'C:\Users\****\AppData\Local\Programs\cursor\Cursor.exe' 'c:\Users\****\.cursor\extensions\anysphere.remote-containers-1.0.18\dist\@devcontainers\cli\dist\spec-node\devContainersSpecCLI.js' 'read-configuration' '--workspace-folder' '\home\michi\dev\private\nextjs-auth' '--config' '\home\michi\dev\private\nextjs-auth\.devcontainer\devcontainer.json' '--docker-path' 'docker'
2025-07-22 08:25:09.003 [info] [read-configuration]: Running command: node
2025-07-22 08:25:09.496 [info] [read-configuration][stderr]: [2025-07-22T06:25:09.494Z] @devcontainers/cli 0.75.0. Node.js v20.19.0. win32 10.0.26100 x64.
2025-07-22 08:25:09.511 [error] [read-configuration]: Running command: node
2025-07-22 08:25:09.512 [error] Failed to read devcontainer config [read-configuration] Command failed with exit code 1: stdout: 
2025-07-22 08:25:09.513 [error] Failed to reopen folder in container Failed to read devcontainer configuratio

I also use GitHub - michidk/vscli: A CLI/TUI that simplifies launching VSCode projects, with a focus on dev containers to open devcontainers. It uses the following command

cursor --folder-uri "vscode-remote://dev-container+7b22686f737450617468223a225c5c5c5c77736c2e6c6f63616c686f73745c5c417263685c5c686f6d655c5c6d696368695c5c6465765c5c707269766174655c5c6e6578746a732d61757468222c22636f6e66696746696c65223a7b22736368656d65223a2266696c65222c22617574686f72697479223a2277736c2e6c6f63616c686f7374222c2270617468223a222f417263682f686f6d652f6d696368692f6465762f707269766174652f6e6578746a732d617574682f2e646576636f6e7461696e65722f646576636f6e7461696e65722e6a736f6e227d7d/workspaces/nextjs-auth"

(built here vscli/src/workspace.rs at main · michidk/vscli · GitHub)

Which works just fine with code instead; and it used to work with Cursor as well. But now I get the following error:

Failed to install Cursor server: [devcontainer up] Command failed with exit code 1: stdout: {"outcome":"error","message":"Dev container config (c:\\Arch\\home\\michi\\dev\\private\\nextjs-auth\\.devcontainer\\devcontainer.json) not found.","description":"Dev container config (c:\\Arch\\home\\michi\\dev\\private\\nextjs-auth\\.devcontainer\\devcontainer.json) not found."}

Since the url is interpreted differently, I think anysphere.remote-containers is handling WSL differently than the vscode devcontainers extension.

Steps to Reproduce

Open any devcontainer

Expected Behavior

Cursor works

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.2.4 (user setup)
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T17:09:01.383Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26100

Does this stop you from using Cursor

Yes - Cursor is unusable

1 Like

GitHub issue: cannot open devcontainers anymore from WSL · Issue #3399 · cursor/cursor · GitHub

Cursor is unusable for me - evaluating alternatives rn

Also cannot open devcontainer with cursor

2025-07-23 14:34:59.316 [error] Failed to reopen folder in container Error running `docker info`. Please ensure docker is installed and running: [docker info] Command failed with exit code 1: stdout: Client:
 Context:    default
 Debug Mode: false
 Plugins:
  ai: Docker AI Agent - Ask Gordon (Docker Inc., v1.6.0)
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Docker Buildx (Docker Inc., v0.25.0-desktop.1)
  cloud: Docker Cloud (Docker Inc., v0.4.2)
  compose: Docker Compose (Docker Inc., v2.38.2-desktop.1)
  debug: Get a shell into any image or container (Docker Inc., 0.0.41)
  desktop: Docker Desktop commands (Docker Inc., v0.1.11)
  extension: Manages Docker extensions (Docker Inc., v0.2.29)
  init: Creates Docker-related starter files for your project (Docker Inc., v1.4.0)
  mcp: Docker MCP Plugin (Docker Inc., v0.9.9)
  model: Docker Model Runner (EXPERIMENTAL) (Docker Inc., v0.1.33)
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scout: Docker Scout (Docker Inc., v1.18.1)

Server:
ERROR: Cannot connect to the Docker daemon at tcp://0.0.0.0:2375. Is the docker daemon running?```

@lohrm-stabl and @Aulia_Rahman, thank you for reporting these issue.

@lohrm-stabl – our extension uses a different format for remote URIs which is not yet compatible with that tool. We are looking into supporting that format; thank you for sharing this. In the meantime, could you attach to the container through the UI? You’ll first need to connect to your WSL remote, and then from there can connect to your container.

@Aulia_Rahman – could you share the full output from your logs? From the portion you shared, it looks like we’re unable to that Docker host. Can you dobule check that the Docker engine is running?

Hi @ravirahman,
I have the same issue when attaching using the UI.

When i open the project in WSL, this appears.

After clicking it, I get the message:
Failed to reopen folder in container: Failed to read devcontainer configuration

Log:
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
 Containers: 27
  Running: 2
  Paused: 0
  Stopped: 25
 Images: 52
 Server Version: 28.3.2
 Storage Driver: stargz
  driver-type: io.containerd.snapshotter.v1
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 CDI spec directories:
  /etc/cdi
  /var/run/cdi
 Discovered Devices:
  cdi: docker.com/gpu=webgpu
 Swarm: inactive
 Runtimes: nvidia runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 05044ec0a9a75232cad458027ca83437aae3f4da
 runc version: v1.2.5-0-g59923ef
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.6.87.2-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 15.46GiB
 Name: docker-desktop
 ID: 881e5d94-f60f-4317-afe7-10ac1caf701e
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Labels:
  com.docker.desktop.address=npipe://\\.\pipe\docker_cli
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  ::1/128
  127.0.0.0/8
 Live Restore Enabled: false
2025-07-25 08:36:52.751 [info] Searching for devcontainer.json files
2025-07-25 08:36:52.800 [info] Found 1 devcontainer.json files: \home\michi\dev\private\nextjs-auth\.devcontainer\devcontainer.json
2025-07-25 08:36:52.800 [info] Reading devcontainer config with command: read-configuration --workspace-folder \home\michi\dev\private\nextjs-auth --config \home\michi\dev\private\nextjs-auth\.devcontainer\devcontainer.json
2025-07-25 08:36:52.815 [info] Running devcontainer CLI command: c:\Users\MichaelLohr\.cursor\extensions\anysphere.remote-containers-1.0.18\dist\@devcontainers\cli\dist\spec-node\devContainersSpecCLI.js read-configuration --workspace-folder \home\michi\dev\private\nextjs-auth --config \home\michi\dev\private\nextjs-auth\.devcontainer\devcontainer.json --docker-path docker
2025-07-25 08:36:52.815 [info] Spawned process 23712: 'C:\Users\MichaelLohr\AppData\Local\Programs\cursor\Cursor.exe' 'c:\Users\MichaelLohr\.cursor\extensions\anysphere.remote-containers-1.0.18\dist\@devcontainers\cli\dist\spec-node\devContainersSpecCLI.js' 'read-configuration' '--workspace-folder' '\home\michi\dev\private\nextjs-auth' '--config' '\home\michi\dev\private\nextjs-auth\.devcontainer\devcontainer.json' '--docker-path' 'docker'
2025-07-25 08:36:52.815 [info] [read-configuration]: Running command: node
2025-07-25 08:36:52.950 [info] [read-configuration][stderr]: c:\Users\MichaelLohr\.cursor\extensions\anysphere.remote-containers-1.0.18\dist\@devcontainers\cli\dist\spec-node\devContainersSpecCLI.js:3
2025-07-25 08:36:52.950 [info] [read-configuration][stderr]: n:"Failed to read/parse secrets",originalError:A})}}(async()=>{let A=Oe.join(__dirname,"..",".."),e=Ee().version,t=process.argv.slice(2),i="exec"===t[0]&&"--help"!==t[1],g=tm([]).parserConfiguration({"boolean-negation":!1,"halt-at-non-option":i}).scriptName("devcontainer").version(e).demandCommand().strict();g.wrap(Math.min(120,g.terminalWidth())),g.command("up","Create and run dev container",l7,h7),g.command("set-up","Set up an existing container as a dev container",p7,D7),g.command("build [path]","Build a dev container image",y7,F7),g.command("run-user-commands","Run user commands",k7,M7),g.command("read-configuration","Read configuration",G7,L7),g.command("outdated","Show current and available versions",U7,x7),g.command("upgrade","Upgrade lockfile",zJ,$J),g.command("features","Features commands",(A=>{A.command("test [target]","Test Features",Tx,Px),A.command("package <target>","Package Features",pJ,DJ),A.command("publish <target>","Package and publish Features",GJ,LJ),A.command("info <mode> <feature>","Fetch metadata for a published Feature",_J,jJ),A.command("resolve-dependencies","Read and resolve dependency graph from a configuration",WJ,VJ),A.command("generate-docs","Generate documentation",iK,rK)})),g.command("templates","Templates commands",(A=>{A.command("apply","Apply a template to the project",PJ,OJ),A.command("publish <target>","Package and publish templates",KJ,HJ),A.command("metadata <templateId>","Fetch a published Template's metadata",sK,gK),A.command("generate-docs","Generate documentation",nK,oK)})),g.command(i?["exec","*"]:["exec <cmd> [args..]"],"Execute a command on a running dev container",K7,H7),g.epilog(`devcontainer@${e} ${A}`),g.parse(i?t.slice(1):t)})().catch(console.error);
2025-07-25 08:36:52.950 [info] [read-configuration][stderr]: ^
2025-07-25 08:36:52.950 [info] [read-configuration][stderr]: SyntaxError: Unexpected identifier 'n'
2025-07-25 08:36:52.950 [info] [read-configuration][stderr]: at wrapSafe (node:internal/modules/cjs/loader:1479:18)
2025-07-25 08:36:52.950 [info] [read-configuration][stderr]: at Module._compile (node:internal/modules/cjs/loader:1508:20)
2025-07-25 08:36:52.950 [info] [read-configuration][stderr]: at Module._extensions..js (node:internal/modules/cjs/loader:1629:10)
2025-07-25 08:36:52.950 [info] [read-configuration][stderr]: at Module.load (node:internal/modules/cjs/loader:1282:32)
2025-07-25 08:36:52.950 [info] [read-configuration][stderr]: at Module._load (node:internal/modules/cjs/loader:1103:12)
2025-07-25 08:36:52.950 [info] [read-configuration][stderr]: at c._load (node:electron/js2c/node_init:2:16955)
2025-07-25 08:36:52.950 [info] [read-configuration][stderr]: at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:179:12)
2025-07-25 08:36:52.950 [info] [read-configuration][stderr]: at node:internal/main/run_main_module:28:49
2025-07-25 08:36:52.951 [info] [read-configuration][stderr]: Node.js v20.19.0
2025-07-25 08:36:52.963 [error] [read-configuration]: Running command: node
2025-07-25 08:36:52.964 [error] Failed to read devcontainer config [read-configuration] Command failed with exit code 1: stdout: 
2025-07-25 08:36:52.964 [error] Failed to reopen folder in container Failed to read devcontainer configuratio

Also is there documentation on the format that cursor uses for their URI format?

Hi @lohrm-stabl, could you check which WSL extension you have installed? If you have the vscode wsl extension, could you install the Anysphere wsl extension? Our remote containers extension is incompatible with the vscode wsl extension.

We also added support for the url format generated by the vscli in version 1.0.20 of the extension. Thank you for raising this issue.

Hi @ravirahman, thanks for your help so far.

I updated to v1.0.20 of the extension. Every time I want to open a devcontainer this happens:


  • anysphere.remote-containers (v1.0.20) is clearly installed.
  • Yet I get the popup: “Extension ‘Dev Containers’ is required to open the remote window.
    Do you want to install the extension?”
  • I don’t see any log or error messages

This happens both when opening with the Cursor UI or vscli.
Btw, the format that vscli uses is just the vscode default one, which many tools support - it was just a way for me to more easily debug the problem. Also disabling and enabling again does not fix the problem.

Hi @lohrm-stabl, there is an issue where it will prompt to only install the dev containers extension, when the WSL extension is also required. We are working on fixing this in the 1.4 update.

In the meantime, could you please install this extension manually?

Hi @ravirahman,

done that:

Btw, seems like the vscli format does not really work. It starts the correct devcontainer but cursor opens the wrong folder (or no folder at all):

This is really frustrating. I try something else every day, just to see that it does not work properly.

Now even if I open a specific devcontanier project using the UI (using open recent), I get the same issue:

@ravirahman 2/2

If this was the only issue, it would mean I have to select the correct folder every single time. Annoying, but I could live with it.

But if I then open the correct folder, I just get this:

or this, when I ‘hit reinstall the server’:

And this keep appearing every time i hit ‘reinstall’.

And, I’m sorry, but this annoying forum where I cannot post no more than three pictures in a post is really starting to get on my nerves.

2 Likes

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.