VSCode login to WSL as user 'codex'

I’m running Windows 11 with WSL (Ubuntu24) and Codex CLI. Codex is working fine. I have it locked down to a ‘codex’ user and ‘dev’ group.
Now I want to connect in from Windows with VSCode and the WSL extension. That does work, but it always comes in as user ‘root’. I don’t want to change the default wsl user to ‘codex’. I want to control the command-line used by the WSL extension to specify the user.

Does anyone know how to change default connection settings for the WSL extension per-server?

When it does connect in the first time, VSCode loads up /root/.vscode-server. That will need to be done for the ‘codex’ user, maybe under /home/codex/.vscode-server. Has anyone seen an issue with that?

As a follow-up, when I get this part working I’m going to setup the VSCode Codex extension. Will there be a similar dance with the user login?

Thanks.

Responding to my own post:

Research leads back to GitHub Issue 286 which is a 6 year old still-open request to allow changing the user ID used to connect into WSL. For our purposes to use Codex, I’m finding that setting default user to ‘codex’ and then connecting is a good solution for a lone developer. It’s not a solution for a lone dev who need to work on different user projects. But there are ways around that too.

This seems to be the answer for the end of 2025. I’m fine if this post self-closes. The question may have different answers later.