I have the following extensions installed in Cursor:
anysphere.remote-containers
ms-vscode.remote-server
I’m starting a devcontainer using the Devcontainer CLI, and I’m trying to open Cursor attached to this running devcontainer using the following script:
CONF=$(printf '{"settingType":"container", "containerId":"%s"}' "$devcontainer_id")
hex_config=$(printf "$CONF" | od -A n -t x1 | tr -d '[\n\t ]')
cursor --folder-uri "vscode-remote://attached-container+${hex_config}${folder}"
Cursor launches, but it doesn’t open the devcontainer. In the Extension Host Output, I see this error:
2025-07-07 20:23:46.988 [info] [resolveAuthority(attached-container,1)][0ms] activating resolver for attached-container+7b2273657474696e67547...
2025-07-07 20:23:46.988 [error] [resolveAuthority(attached-container,1)][0ms] no resolver for attached-container undefined
Any idea how to make this work with Cursor?
Works fine for vscode tho.
Steps to Reproduce
Start any devcontainer useing devcontainer CLI
Open cursor with setting provided above using containerId
Expected Behavior
While the attached-container authority works as expected in VS Code, it throws an error and fails to resolve in Cursor.
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Hi @Shashwat_Triparthi – we do not yet support the Attached Container Configuration Files where these settings would be stored. We are working on adding this functionality in to the extension. We currently use the same user that was used to start the container.
Hi @ravirahman I saw that the changelog for the latest release includes:
Support remoteUser and customizations defined as part of the container image or devcontainer features. (Only applies to newly opened containers)
However, it looks like the remoteUser property in the devcontainer.json (e.g., "remoteUser": "vscode") is still not being applied when attaching to an existing container using the attached-container scheme.
Is this the expected behavior with the current release, or should it now be supported?
Also, is there a timeline for when support for remoteUser in the attached-container scenario might be available?
Thanks for your help!
Note:
I am starting devcontainer using devcontainer cli
devcontainer up --workspace-folder $repo_path --config $devcontainer_file --mount type=bind,source=$HOST_CACHE,target=$CONTAINER_CACHE
And the I am attaching container started above with cursor like this
CONF=$(printf '{"settingType":"container", "containerId":"%s"}' "$devcontainer_id")
hex_config=$(printf "$CONF" | od -A n -t x1 | tr -d '[\n\t ]')
cursor --folder-uri "vscode-remote://attached-container+${hex_config}${folder}"
Hi @Shashwat_Triparthi, thank you for your patience as we worked through this issue. We released version 1.0.19 of the Remote Containers extension, which supports Attached Container Configuration files. Could you try upgrading to the latest version?
Hi @Shashwat_Triparthi, could you use the dev-container+ scheme instead of attached-container+?
The schema for the JSON blob is:
{
settingType: 'config'; // should be the literal string 'config'
workspacePath: string; // path to workspace
devcontainerPath: string; // path to the devcontainer.json file
}
Similar to before, you’ll want to hex-encode this, and then put it in the uri. We do not read the remoteUser when using the attached-container scheme.
Hey @ravirahman I am starting devcontainer using the DevContainer CLI. From what I understand, when using the dev-container+ scheme, Cursor starts the container itself.
In VS Code, using the attach-container+ scheme respects the remoteUser field from devcontainer.json.
Is there a workaround that lets me keep using the DevContainer CLI to start the container, but attach it in Cursor in a way that respects the remoteUser defined in devcontainer.json?