Remote SSH + Dev Containers + Specifying Remote User

Describe the Bug

Everyone I have talked to in my immediate circle has been facing this problem and it feels impossible to solve. Other people have gotten close but no thread actually has solved this problem.

following the idea of mac->ssh into linux->starting a docker container (dev container).
our dev container needs the remote user to be “xxx-1001” instead of “xxx” when starting up. When I attach or “reopen in container” it will always open a workspace with “xxx.” when i sudo su xxx-1001 I can switch into the new user and do things (like save files), but that does not override the entire thing on cursor.

When on linux, the users can open a settings.json that allows them to specify “remoteUser” as xxx-1001 and everything works great. It seems to only be an issue for the mac users that are ssh-ing and using cursor on mac. Otherwise, this is fine on VS code

Steps to Reproduce

Create a docker image
create a .devcontainer/devcontainer.json
specify a "remoteUser’ that is different than the rootUser of the image

Operating System

MacOS
Linux

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.1.3 (Universal)
VSCode Version: 1.96.2
Commit: 979ba33804ac150108481c14e0b5cb970bda3260
Date: 2025-06-15T06:37:17.379Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0

Additional Information

This is very close to the issues im getting:

Does this stop you from using Cursor

Yes - Cursor is unusable

I was able to use “open folder in container” command using the remoteUser and the image that we are using, however we have commands required to start the image found in a script called

docker/dev/start.sh

regularly we use

docker/dev/into.sh

to enter the docker image.
what i found was that the “open folder in container” command starts a new container with a new ID and thus does not have any of the requirements for building/pushing/running. Is there a way that I can use “attach to running container” with this “remoteUser” or to configure “open folder in container” to run in the existing container?