Dev Container extension runs container as root

Describe the Bug

When I open a devcontainer using the Anysphere extension with a default devcontainer.json file, the default user is root.

Steps to Reproduce

Use the following minimal configuration to reproduce

{
    "name": "C++ Dev Container",
    "image": "mcr.microsoft.com/devcontainers/cpp:1-ubuntu-24.04"
}

And then Ctrl+Shift+P and select “Dev Containers: Reopen in Container”

Expected Behavior

The VSCode Dev Container extension will open the container with the vscode user. This is baked into the base image that this image "mcr.microsoft.com/devcontainers/cpp:1-ubuntu-24.04" is based on.

I would expect that switching to Cursor, and mandating the use of the Anysphere extension should result in the same behaviour.

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

Additional Information

A workaround for this would be of course to add “vscode” as a remote user but I don’t know how much of an issue this would be if people are working collaboratively where some people are using VSCode and others are using Cursor.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hi @adam3141, thank you for reporting this issue. We were able to reproduce it and are working on a fix.

Hi @adam3141, we just released version 1.0.14 of the extension, which fixes this issue.

You may need to rebuild existing containers to get this fix. We tried to avoid applying the new (correct) behavior when we detect files owned by the default (root) user, as to avoid permissions issues when upgrading the extension version.

Thank you for being so responsive. I will give this a try tomorrow and let you know

Updated to the latest extension version and confirm it’s working.

Thank you :slightly_smiling_face: