Repository navigation
agentHost: create Canvas data directory before sandboxed launch - #349930
Merged
Dileep Yavanmandha (dileepyavan) merged 2 commits intoNov 23, 2026
Merged
Conversation
Co-authored-by: Copilot <[email protected]>
Dileep Yavanmandha (dileepyavan)
enabled auto-merge
November 23, 2026 19:18
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The Canvas grant tests still use /copilot-home, so real directory creation can fail on unprivileged runners or leave persistent state; the fixtures need a shared temporary home and teardown cleanup.
1 open issue
What changed in this PR
Addresses #348764 by creating Canvas storage before sandboxed Copilot SDK create or resume, allowing first saves on a fresh Copilot home without broadening sandbox permissions.
Changes:
- Creates
extension-dataonly when Canvas is enabled and the launch configuration grants write access. - Shares the directory-path helper and allows tests to supply a Copilot home.
- Adds create/resume regression tests for granted and withheld access, and documents the behavior.
| File | Description |
|---|---|
src/vs/workbench/contrib/sessions/providers/agentHost/AGENT_HOST_SESSIONS_PROVIDER.md |
Documents host-side storage preparation. |
src/vs/platform/agentHost/test/node/copilotSessionLauncherTestHelpers.ts |
Adds a configurable test Copilot home. |
src/vs/platform/agentHost/test/node/copilotSessionLauncher.test.ts |
Adds first-save and withheld-access regression tests. |
src/vs/platform/agentHost/node/copilot/sandboxConfigForSdk.ts |
Exposes a shared extension-data path helper. |
src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts |
Creates granted Canvas storage before SDK opening. |
Review effort: Balanced
Co-authored-by: Copilot <[email protected]>
Federico Brancasi (federicobrancasi)
approved these changes
Nov 23, 2026
Christof Marti (chrmarti)
approved these changes
Nov 23, 2026
Dileep Yavanmandha (dileepyavan)
deleted the
DileepY/canvas-first-save
branch
November 23, 2026 21:58
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.

Fixes #348764. On a fresh Copilot home, the sandbox can write inside the granted extension-data directory but cannot create it in its protected parent. Create that directory on the host before SDK create or resume, only when the launch policy grants it. No sandbox permissions are broadened.
Adds launcher regression tests for first save and withheld access on create and resume. On the main-based port, the diff check and an isolated filesystem check passed. The launcher tests and client type-check could not run on this revision because dependency restore returned HTTP 404 for the pinned SDK. The live macOS sandbox was not retested.