Describe the Bug
Hello,
after getting recommended to switch to the Anysphere version of the docker devcontainer extension, all devcontainers on remote hosts stopped working. I’ve deleted existing containers/images and tried rebuilding them but this didn’t help. This is the exact error I get (“<path_to_workspace>” is the path to my project):
2025-07-07 14:31:56.651 [info] Searching for devcontainer.json files
2025-07-07 14:31:56.944 [info] Found 1 devcontainer.json files: <path_to_workspace>/.devcontainer/devcontainer.json
2025-07-07 14:31:56.944 [info] Reading devcontainer config with command: read-configuration --workspace-folder <path_to_workspace> --config <path_to_workspace>/.devcontainer/devcontainer.json
2025-07-07 14:31:56.944 [info] Running devcontainer CLI command: /tmp/devcontainer-cli-5925567b-b752-4a83-b709-3d6c9272bf42/cli/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder <path_to_workspace> --config <path_to_workspace>/.devcontainer/devcontainer.json --docker-path docker
2025-07-07 14:31:56.997 [error] Failed to read devcontainer config CodeError(ProcessSpawnFailed(Os { code: 2, kind: NotFound, message: "No such file or directory" }))
2025-07-07 14:31:57.000 [error] Failed to reopen folder in container Failed to read devcontainer configuration
All the referenced files exist but the extension seemingly still can’t read my devcontainer.json file.
Steps to Reproduce
I connect to a remote host via ssh (works perfectly, uses Agent forwarding), open a workspace there and select “DevContainers: Reopen in Container”.
Expected Behavior
Devcontainers should be building and getting attached to normally (as with the default vscode extension).
Operating System
Linux
Current Cursor Version (Menu → About Cursor → Copy)
Version: 1.2.1
VSCode Version: 1.99.3
Commit: 031e7e0ff1e2eda9c1a0f5df67d44053b059c5d0
Date: 2025-07-03T06:13:13.763Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Linux x64 6.8.0-62-generic
Additional Information
I’m using the Anysphere “Dev Containers” extension version 1.0.8. The same error occurs for other versions.
Does this stop you from using Cursor
Yes - Cursor is unusable
4 Likes
Having the same issue here, it suddenly stopped working after installing the anysphere devcontainer extension, before it worked without problems, and just using the devcontainer cli, it all perfectly starts. So it is not an issue with the devcontainer setup itself. Since we can´t downgrade to the old extension, this makes Cursor not really usable.
3 Likes
Having the same problem here too. This is a blocker for my team’s development.
I was able to make progress on this issue by installing the anysphere Remote - SSH
extension and uninstalling the Microsoft extension of the same name, but I now get the following popup error after trying to rebuild/reopen in container:
“Failed to connect to the remote extension host server (Error: Unexpected end of JSON input)”
1 Like
Thanks for the suggestion. This actually fixed it for me!
I guess the next step for you would be to start over with a minimal devcontainer.json and successively re-adding your additional options. I hope you can fix your setup as well 
I was able to make progress on this issue by installing the anysphere Remote - SSH
extension and uninstalling the Microsoft extension of the same name
Yes, this is correct – the Anysphere remote containers extension does require the Anysphere Remote SSH extension to use Docker over SSH.
@Liamazing, could you try upgrading to version 1.0.10 of the extension? We fixed a few compatibility issues when coming from the VSCode extension. If that doesn’t work, could you share the full logs from the “Remote - Dev Containers” and “Remote - SSH” output windows so we can take a closer look?
Same issue since I replaced MS dev containers by Anysphere dev containers
2025-07-11 10:27:56.249 [info] Searching for devcontainer.json files
2025-07-11 10:27:56.515 [info] Found 1 devcontainer.json files: \home\alexis\***.***\.devcontainer\devcontainer.json
2025-07-11 10:27:56.515 [info] Reading devcontainer config with command: read-configuration --workspace-folder \home\alexis\***.***--config \home\alexis\***.***\.devcontainer\devcontainer.json
2025-07-11 10:27:56.545 [info] Running devcontainer CLI command: c:\Users\WEBM3\.cursor\extensions\anysphere.remote-containers-1.0.12\dist\@devcontainers\cli\dist\spec-node\devContainersSpecCLI.js read-configuration --workspace-folder \home\alexis\***.***--config \home\alexis\***.***\.devcontainer\devcontainer.json --docker-path docker
2025-07-11 10:27:56.545 [info] Spawned process 26128: 'C:\Users\WEBM3\AppData\Local\Programs\cursor\Cursor.exe' 'c:\Users\WEBM3\.cursor\extensions\anysphere.remote-containers-1.0.12\dist\@devcontainers\cli\dist\spec-node\devContainersSpecCLI.js' 'read-configuration' '--workspace-folder' '\home\alexis\***.***' '--config' '\home\alexis\***.***\.devcontainer\devcontainer.json' '--docker-path' 'docker'
2025-07-11 10:27:56.545 [info] [read-configuration]: Running command: node
2025-07-11 10:27:56.674 [info] [read-configuration][stderr]: [2025-07-11T08:27:56.673Z] @devcontainers/cli 0.75.0. Node.js v20.19.0. win32 10.0.26100 x64.
2025-07-11 10:27:56.683 [error] [read-configuration]: Running command: node
2025-07-11 10:27:56.683 [error] Failed to read devcontainer config [read-configuration] Command failed with exit code 1: stdout:
2025-07-11 10:27:56.684 [error] Failed to reopen folder in container Failed to read devcontainer configuration
```
Hi @GhostvOne – it looks like this container was created inside WSL. Could you first open a WSL window, and then attach to the container? We’re unable to read the config from the Windows side when the container was opened in WSL.
@ravirahman my workflow is:
- launch remote ssh connection from the command line on my Mac. We will call this “Window 1”
- click the “reopen in container” popup after cursor detects the devcontainer which opens up a new cursor window – we’ll call this “Window 2”
There are no remote ssh extension logs for window 2. I have attached the output of the other remote ssh and dev containers logs.
My extension versions are as follows:
anysphere.remote-containers
-1.0.14
anysphere.remote-ssh
-1.0.21
window_2_dev_container_log.txt (417 Bytes)
window_1_ssh_log.txt (59.6 KB)
window_1_dev_containers_log.txt (5.4 KB)
1 Like
@ravirahman the error that pops up in the “Window 2” is:
Failed to connect to the remote extension host server (Error: Invalid DevContainerDestination JSON: )
Any idea what I can do to debug this?
Hi @Liamazing , could you share the full logs (if there are more) from the “Remote - Dev Containers” console where that error (Failed to connect to the remote extension host server (Error: Invalid DevContainerDestination JSON:
) came from?
Could you also share the logs from the “Remote - SSH” console?
It seems like there is an error with how we’re parsing the connection string.
Of course! It’s in the .txt file in my post above, but here it is again inline:
2025-07-17 12:15:45.740 [info] No remote exec server found for authority: dev-container+7b2273657474696e6754797065223a22636f6e666967222c22776f726b737061636550617468223a222f686f6d652f6275696c742f676169612d7468656961222c22646576636f6e7461696e657250617468223a222f686f6d652f6275696c742f676169612d74686569612f2e646576636f6e7461696e65722f646576636f6e7461696e65722e6a736f6e227d@[email protected]; using local
Thanks for the help, I can only take so much of vscode + copilot. Regarding logs from the “Remote - SSH” console, there are none, unless you’re referring to the original SSH window from which I launch the dev container window (those too are attached as a .txt file to the post above)
Hi @Liamazing, thank you for this. We were able to reproduce this issue and are working on a fix. The issue arises when explicitly specifying the SSH username in the connection string when the window was originally opened with an older version of our ssh extension that did not properly escape @
.
In the meantime, could you try upgrading to the latest version of the Anysphere Remote SSH extension, and then open a new ssh window for your host (do not use “Open Recent” – this will use the old (broken) format that’s stored in the history!)?
You can open a new window via the “Remote SSH: Connect to Host” command:
.
Then, from within this new window, could you try attaching to your container?
amazing Ravi, that worked! flagging for you that I have to run
git config --global --add safe.directory /workspaces/{repo_name}
which is new behavior in the cursor dev container compared to dev containers with the ms vscode extension
1 Like