Skip to content

agentHost: grant sandbox write access to Canvas data - #348961

Merged
Dileep Yavanmandha (dileepyavan) merged 1 commit into
mainfrom
DileepY/canvas-sandbox-data
Nov 18, 2026
Merged

Dileep Yavanmandha (dileepyavan) merged 1 commit into
mainfrom
DileepY/canvas-sandbox-data

Conversation

@dileepyavan

@dileepyavan Dileep Yavanmandha (dileepyavan) commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

fixes #348764
Sandboxed Copilot Agent Host sessions with Canvas enabled request write access to <COPILOT_HOME>/extension-data on create and resume without granting the parent directory. Conflicting path restrictions and managed writable-path lists take precedence.

Validation before porting to main: client type-check passed and 290 sandbox configuration and session launcher tests passed. A first write from a live sandboxed canvas provider was not verified.

Copilot AI balanced review requested due to automatic review settings November 18, 2026 00:38
@vs-code-engineering

vs-code-engineering Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

No demo for 02c0a5e. Changes internal sandbox write permissions for Canvas data; no visible UI change. Workflow run

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Live Canvas validation is still needed to confirm first-write creation of an absent extension-data directory while preserving parent and source-directory isolation.

No open issues 🎉

What changed in this PR

Adds sandbox write access to Canvas’s shared <COPILOT_HOME>/extension-data directory for Copilot Agent Host sessions, without granting access to the parent directory.

Changes:

  • Carries Canvas enablement and Copilot home through session creation, resume, and subsequent sandbox updates.
  • Adds the writable default while preserving conflicting path restrictions and managed writable-path policies.
  • Adds focused policy tests and documents the access boundary.

No actionable findings remain. The PR reports passing type-checks and targeted tests; a live sandboxed Canvas write remains unverified.

File Description
src/​vs/​workbench/​contrib/​sessions/​providers/​agentHost/​AGENT_HOST_SESSIONS_PROVIDER.md Documents Canvas data access and its limits.
src/​vs/​platform/​agentHost/​test/​node/​sandboxConfigForSdk.test.ts Tests the writable default and restriction precedence.
src/​vs/​platform/​agentHost/​node/​copilot/​sandboxConfigForSdk.ts Computes policy-aware Canvas data grants.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotSessionSandbox.ts Retains extension home for sandbox configuration and attachment checks.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotSessionLauncher.ts Passes extension enablement into launch-time sandbox configuration.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotAgentSession.ts Supplies Copilot home when extensions are requested.

Review effort: Balanced

@tommieboings50-source tommieboings50-source left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't ever know what I can or can not close

Merged via the queue into main with commit c0b608a Nov 18, 2026
38 of 39 checks passed
@dileepyavan
Dileep Yavanmandha (dileepyavan) deleted the DileepY/canvas-sandbox-data branch November 18, 2026 01:56
@vs-code-engineering vs-code-engineering Bot added this to the 1.148.0 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sandbox blocks canvas extension from writing its private state

5 participants