[WindowsSandboxing]: Updated env and commandline for executing commands using pwsh.exe#318466
Open
dileepyavan wants to merge 30 commits into
Open
[WindowsSandboxing]: Updated env and commandline for executing commands using pwsh.exe#318466dileepyavan wants to merge 30 commits into
dileepyavan wants to merge 30 commits into
Conversation
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @anthonykim1Matched files:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Windows MXC-based terminal sandboxing integration to improve command execution by updating the MXC SDK dependency, expanding the injected PowerShell-related environment variables, and adjusting the MXC config command line/cwd behavior.
Changes:
- Bump
@microsoft/mxc-sdkfrom0.2.0to0.2.1(root + remote). - Expand Windows MXC environment injection (SystemRoot, ComSpec, PATHEXT, PSModulePath, user profile paths, etc).
- Update Windows MXC config generation (containment mode,
pwsh.execommand wrapping, default cwd behavior) and add coverage for Windows symlink resolution.
Show a summary per file
| File | Description |
|---|---|
| test/sanity/src/context.ts | Broadens the MXC SDK bin exclusion for VersionInfo validation. |
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/browser/terminalSandboxService.test.ts | Updates Windows sandbox test env setup and asserts injected env vars/command line. |
| src/vs/platform/sandbox/test/common/terminalSandboxEngine.test.ts | Updates Windows MXC expectations, adds filesystem symlink resolution coverage, adjusts arm64/debug expectations. |
| src/vs/platform/sandbox/node/sandboxHelper.ts | Injects additional Windows env vars needed for PowerShell execution (incl. LOCALAPPDATA). |
| src/vs/platform/sandbox/common/terminalSandboxMxcRuntime.ts | Updates MXC config schema/fields and wraps commands via pwsh.exe, adds quoting helper. |
| src/vs/platform/sandbox/common/terminalSandboxEngine.ts | Defaults Windows MXC cwd, resolves Windows realpaths via URI normalization helpers. |
| remote/package.json | Bumps @microsoft/mxc-sdk to 0.2.1 (remote). |
| remote/package-lock.json | Lockfile update for @microsoft/mxc-sdk@0.2.1 (remote). |
| package.json | Bumps @microsoft/mxc-sdk to 0.2.1 (root). |
| package-lock.json | Lockfile update for @microsoft/mxc-sdk@0.2.1 (root). |
Copilot's findings
Files not reviewed (1)
- remote/package-lock.json: Language not supported
- Files reviewed: 8/10 changed files
- Comments generated: 4
roblourens
previously approved these changes
May 27, 2026
Gate Copilot CLI smoke test on existing env var
Chat: OTel enrichment for agent context
Mirrors the programmatic-export contract already supported by the chat extension's github.copilot.chat.otel.exportAgentTracesDB command: when callers pass a destination directory, the DB is copied to <dir>/agent-host-traces.db with no save dialog. The interactive (command palette) flow is unchanged.
Addresses review feedback: OTelSqliteStore opens the DB in WAL mode and runs in a separate utility process, so a plain copy of the .db file can miss uncheckpointed data still living in the -wal sidecar. We can't safely issue 'wal_checkpoint' from the workbench process, so instead copy the -wal and -shm sidecars alongside the main .db when they exist. The resulting trio is a valid WAL-mode SQLite database that any reader can open and checkpoint on demand.
chat: accept optional savePath arg for agentHost export action
…318096) * feat: Implement changeset state caching and management in AgentHost * Fixes * fix: Update restoreSessionIfChangesetSubscription to return void and clarify handling of non-changeset URIs * refactor: Simplify changeset eviction logic and improve comments for clarity * feat: Add releaseBranchChanges method and enhance session summary change notifications
* Fix offline BYOK state management Co-authored-by: Copilot <copilot@github.com> * PR feedback --------- Co-authored-by: Copilot <copilot@github.com>
add sessions link
* Decode image name for display in carousel * Add test for percent-encoded carousel image names Co-authored-by: kycutler <67761731+kycutler@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
) (#318228) The provideAltTextQuickFix method calls document.lineAt(range.start.line) without validating that the line number is within bounds. When the document is modified between when VS Code computes the range and when the code action provider executes, an out-of-bounds line number causes 'Illegal value for `line`' to be thrown. Add a bounds check before calling lineAt() so the method returns early instead of throwing. Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
) (#318229) The memory leak fix in 1fc96f7 added cleanup of loggers on deregistration. This created a race condition where IPC log messages from renderer processes arrive after the logger has been removed from the map, causing an unhandled error. Replace the throw with a silent return since log messages for a removed logger are stale and should be discarded. Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
[cherry-pick] Issue reporter wizard: dont include settings
Squashed cherry-pick of 10 commits from main that are included in the Insiders build (183159e) people are verifying: - agentHost: show fetched URL for web_fetch (#318240) - Fix SSH remote agent host passphrase auth (#318244) - agentHost: add setting to disable worktreeCreated task auto-dispatch (#318243) - Agent host: clearer worktree git timeout errors and 60s budget (#318242) - Normalize LF to CRLF in agent host terminal tool output (#318257) - sessions: restore X-button removal of SSH remote agent host entries (#318262) - chat: fix duplicate command registration for agent-host-copilotcli (#318273) - launch: build copilot in compile; wait for CDP in launch.sh (#318272) - Preserve unread state across remote host disconnect (#318267) - Add more codenotify for terminal (#318285)
[cherry-pick] Disable walkthrough if ai features disabled on startup
…accounts (#318427) Co-authored-by: vs-code-engineering[bot] <vs-code-engineering[bot]@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains :
This should improve command execution in windows sandboxing.