Dev Container Mounts can not use local variables (again, please fix)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I have mounts listed in my devcontainer.json. Some of these mounts interpolate environment variables that I have defined in my ~/.bashrc, e.g.

"source=${localEnv:MOUNT_SOURCE},target=/mount/dest,type=bind"

When reopening my workspace in a devcontainer, these environment variables fail to be interpolated and cause the devcontainer to fail to open. This is not an issue that I encounter when using vscode.

I have confirmed that I am able to echo these env vars in the cursor terminal immediately before rebuilding/reopening in devcontainer. $HOME seems to work fine, but variables exported from .bashrc do not work (they DO work with vscode)

Steps to Reproduce

See above.

Operating System

MacOS

Version Information

Version: 2.6.14 (Universal)
VSCode Version: 1.105.1
Commit: eb1c4e0702d201d1226d2a7afb25c501c2e56080
Date: 2026-03-08T15:36:54.709Z
Build Type: Stable
Release Track: Default
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.3.0

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report. I see it’s the same issue we fixed before, so this looks like a regression.

Can you check which version of the Anysphere Remote SSH extension you have installed? (Extensions panel > search for “Remote SSH” > check the version). Last time, the fix landed in v1.0.44.

If you’re on the latest version and it still reproduces, I’ll pass it to the team as a regression.

As a temporary workaround, you can hardcode the paths instead of using ${localEnv:MOUNT_SOURCE}, or export the variables from ~/.zshenv or /etc/environment (these files are read for non-interactive shells).

I’m on 1.0.46, what a quick regression!

Bump!

Hey, sorry for the delay. Confirmed, it’s in v1.0.46 and it reproduces, so this is a regression from the v1.0.44 fix. I’ve already passed this to the team.

Let me know if anything changes.

Thanks Dean, looking forward to the resolution

Where does the bug appear (feature/product)?

  • Cursor IDE

  • Cursor CLI

  • Background Agent (GitHub, Slack, Web, Linear)

  • BugBot

  • Somewhere else…


Describe the Bug
If I use set the workspaceFolder property in any devcontainer using a variable, the string doesn’t resolve. Pre-launch validation also fails, because it require the string to be absolute start with a /. Isn’t support for this part of the spec?


Steps to Reproduce
How can you reproduce this bug? We have a much better chance at fixing issues if we can reproduce them!

  1. Create a devcontainer.json file in .devcontainer/

  2. Use a variable in the workspaceFolder property
    {
    “workspaceFolder”: “${localEnv.WORKSPACE_FOLDER}”,
    //…

  3. Reopen window in devcontainer


Expected Behavior
The variable will be resolved to the variable value in configured .env


Screenshots / Screen Recordings
If applicable, attach images or videos (.jpg, .png, .gif, .mp4, .mov)

Failed to reopen folder in container: [UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character


Operating System

  • Windows 10/11

  • MacOS

  • Linux


Version Information

  • For Cursor IDE: Menu → About Cursor → Copy

  • For Cursor CLI: Run agent about in your terminal

IDE:
Version: 2.6.18
VSCode Version: 1.105.1
Commit: 68fbec5aed9da587d1c6a64172792f505bafa250
Date: 2026-03-10T02:01:17.430Z
Build Type: Stable
Release Track: Default
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.3.0


For AI issues: which model did you use?
Model name (e.g., Sonnet 4, Tab…)

N/A


For AI issues: add Request ID with privacy disabled
Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1
For Background Agent issues, also post the ID: bc-…

N/A


Additional Information
Add any other context about the problem here.


Does this stop you from using Cursor?

  • Yes - Cursor is unusable

  • Sometimes - I can sometimes use Cursor

  • No - Cursor works, but with this issue

Hey @systemcarl!

Thanks for reporting. Have merged your report into an existing thread reporting the same issue.

1 Like

Bump @Colin when can I expect this to be fixed?