Skip to content

PowerShell provider location differs from the process working directory in an MXC sandbox #825

Closed

Description

Relevant area(s)

Windows

Brief description of your issue

This was observed when GitHub Copilot CLI 1.0.79-9 used its in-process MXC sandbox for a workspace on D:.

The PowerShell process retained the requested working directory, but PowerShell initialized its provider location as C:\.

Impact

PowerShell resolves provider-relative paths from its provider location rather than the requested process working directory. Therefore, commands and scripts using relative paths may:

  • fail to find files in the workspace;
  • read from or write to an unintended path under C:\;
  • fail because the sandbox does not permit the resulting C:\ path.

GitHub Copilot CLI commonly executes generated PowerShell commands using workspace-relative paths. Requiring every command to use absolute paths makes the sandboxed shell unreliable for normal agent workflows.

Steps to reproduce

  1. Open GitHub Copilot CLI in a workspace on D:.

  2. Enable the sandbox.

  3. Run the following PowerShell command through the sandbox:

    "ProcessCwd=$([Environment]::CurrentDirectory)"
    "PSLocation=$((Get-Location).Path)"

Expected behavior

ProcessCwd=D:\workspace\project
PSLocation=D:\workspace\project

Actual behavior

ProcessCwd=D:\workspace\project
PSLocation=C:\

PowerShell does not report that its provider location differs from the requested working directory.

PR #448 notes that PowerShell’s Set-Location walks ancestor directories through the FileSystemProvider and may require access not granted to the AppContainer. The observed mismatch appears consistent with that limitation, but #448 does not address it.

Activity

  1. added
    Needs-Triage
    Issue-Bug
    OS-Windows
    on Aug 12, 2026
  2. added
    Backend-ProcessContainer
    on Aug 12, 2026
  3. removed
    Needs-Triage
    on Aug 12, 2026
  4. github-actions commented on Aug 12, 2026

    @github-actions

    Triage summary

    • Labels added: Container-Process (OS-Windows was already present)
    • Assigned: @jsidewhite, @mgudgin (AppContainer / process isolation owners)

    This appears to be an AppContainer sandbox issue where PowerShell's FileSystemProvider falls back to C:\ as its provider location when the process working directory is on a non-system drive (e.g., D:), likely because the AppContainer lacks sufficient traversal access to initialize the provider at the requested path. Related context in PR #448.

    Maintainers: Comment /investigate to check whether this issue or bug is valid against the most current code. Copilot will also produce a report with the changes that will be needed. For a small, unambiguous documentation or test fix, it may also create one draft PR.

    Generated by 🏷️ Issue Triage for #825 · sonnet46 · 24.6 AIC · ⌖ 5.31 AIC · ⊞ 7.3K · ◷

  5. github-actions commented on Aug 12, 2026

    @github-actions

    Triage summary

    • Labels applied: Issue-Bug, OS-Windows, Container-Process (already present — confirmed correct)
    • Owners assigned: @jsidewhite, @mgudgin (already assigned — confirmed correct for AppContainer/process isolation on Windows)
    • Needs-Triage removed

    This is a Windows AppContainer/process-container issue where PowerShell's FileSystemProvider location does not follow the requested process working directory when the workspace is on a non-C: drive, likely because Set-Location traversal to the target drive requires filesystem access not granted to the AppContainer.

    Maintainers: Comment /investigate to check whether this issue or bug is valid against the most current code. Copilot will also produce a report with the changes that will be needed. For a small, unambiguous documentation or test fix, it may also create one draft PR.

    Generated by 🏷️ Issue Triage for #825 · sonnet46 · 21 AIC · ⌖ 4.09 AIC · ⊞ 7.3K · ◷

  6. github-actions commented on Aug 12, 2026

    @github-actions

    Triage summary

    This issue was already labeled (Issue-Bug, OS-Windows, Container-Process) and assigned (@jsidewhite, @MGudgin) before triage ran. No new labels or owners were added.

    The issue describes a PowerShell provider location mismatch when the sandbox working directory is on a non-C: drive (e.g., D:), consistent with the AppContainer FileSystemProvider limitation noted in PR #448.

    Generated by 🏷️ Issue Triage for #825 · sonnet46 · 21 AIC · ⌖ 5.31 AIC · ⊞ 7.3K · ◷

  7. added
    Priority1
    on Aug 17, 2026
  8. jsidewhite commented on Sep 14, 2026

    @jsidewhite
    Member

    This does not repro on latest Windows Insider build - the issue was fixed in 8D release.

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

Metadata

Metadata

Labels

Backend-ProcessContainerIssue-BugOS-WindowsPriority1

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions