Skip to content

Agent sandbox blocks Node.js in a workspace on a volume mount point; allowing the volume GUID prevents sandbox startup #343231

Open

Description

Environment

  • Windows, VS Code Insiders
  • Copilot SDK agent with sandboxing enabled
  • Workspace: C:\xxx\Projects\LanguageServer\NodeMain
  • C:\xxx\Projects is a mount point for a Dev Drive partition with no drive letter

Problem

Running a Node.js command through the agent fails while Node resolves the script path, even though the workspace is accessible and the mount point is explicitly included in the sandbox's read-only paths.

The command is:

npm run validate:version

It invokes:

node ./tools/lib/validate-main.js

The agent runs it from the workspace directory, but Node fails before the script executes:

Error: EPERM: operation not permitted, stat 'C:\xxx\Projects'
    at Object.realpathSync (node:fs:2886:37)
    at toRealPath (node:internal/modules/helpers:67:13)
    at Module._findPath (node:internal/modules/cjs/loader:850:22)
    at resolveMainPath (node:internal/modules/run_main:35:21)
    at Module.executeUserEntryPoint (node:internal/modules/run_main:146:20)

Node.js v24.21.0

Configuration and troubleshooting

The sandbox configuration includes:

"chat.agent.sandbox.fileSystem.userConfiguredPaths": {
    "readonlyPaths": [
        "C:\\xxx\\Projects"
    ]
}

The same failure occurs after restarting VS Code, both with and without a trailing backslash on the allowed path.

Running this in a normal terminal confirms the mount point's volume:

mountvol.exe 'C:\xxx\Projects\' /L

It returns:

\\?\Volume{65c080c2-a524-45c1-9aa8-a1d99c491ef7}\

Adding that volume GUID path to readonlyPaths:

"\\\\?\\Volume{65c080c2-a524-45c1-9aa8-a1d99c491ef7}\\"

causes a different failure: the agent's shell process can no longer start.

failed to create the process security environment:
CreateProcessSecurityEnvironment failed (HRESULT = 0x8007000F)

Expected behavior

A workspace on a Windows volume mount point should support sandboxed Node.js commands. Explicitly allowing the mount-point path should permit the path resolution needed to load scripts within the workspace.

If volume GUID paths are unsupported in the sandbox configuration, the setting should reject them with an actionable validation message rather than prevent process startup.

Actual behavior

  • Allowing the mount-point path still results in EPERM during Node.js path resolution.
  • Allowing the underlying volume GUID path prevents sandbox initialization.
  • The version-validation script never executes.

Activity

  1. added
    important
    on Oct 21, 2026
  2. dbaeumer commented on Oct 21, 2026

    @dbaeumer
    MemberAuthor

    This problems make all my node scripts fail for all of my workspaces. If I disabled sandbox I need to approve all script executions.

  3. dbaeumer commented on Oct 21, 2026

    @dbaeumer
    MemberAuthor

    And using a Dev Drive is a recommended Windows setup for developers :-)

  4. dileepyavan commented on Oct 21, 2026

    @dileepyavan
    Member

    Dirk Bäumer (@dbaeumer) I was able to repro this issue and this needs to be resolved upstream by windows sandboxing(mxc) .Created microsoft/mxc#1548

  5. dileepyavan commented on Oct 21, 2026

    @dileepyavan
    Member

    Using dev drive without mounting works without any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

important

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions