You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chat: require Agent Host for managed permissions - #340617
Supersedes #340408. Builds on the automatic migration and cleanup in #340585 and #340596.
Any nonempty managed permissions object now requires Copilot Agent Host, including
defaults, explicit false / "enable", and empty rule lists. This reuses the existing
Local chat migration without sending anything automatically.
Copilot's permission picker reflects runtime restrictions and defaults, allowing
admins to block Allow All while keeping Assisted available. Explicit new mode
restrictions replace the legacy blanket restriction; defaultMode alone does not.
Empty permissions: {} and legacy policy alone retain existing Local behavior.
Editor Inline Chat keeps its limited read/edit exception. Sandboxing remains independent.
Policy behavior
Legacy ChatToolsAutoApprove: false with no managed permissions still blocks
both Allow All and Assisted in Copilot Agent Host. It does not force users off
Local. A nonempty permissions object determines harness eligibility; only an
explicit new mode restriction replaces the legacy blanket mode restriction.
The table shows selectable modes, not the starting selection. It assumes all
modes are supported and no additional restrictions. Legacy JSON represents policy
values, not OS-specific deployment syntax. Local does not support Assisted.
permissions: {} behaves like no permissions object. Rows 6, 8, and 9 intentionally
replace the legacy restriction with the explicitly configured new mode controls.
Rows 11 and 12 require Agent Host but retain the legacy mode restriction.
In row 10, Assisted is the starting default unless an explicit or remembered
choice takes precedence; in row 11 it is unavailable, so the default falls back
to Manual.
“Migrate to Copilot” means full Local execution is unavailable: new chats use
Copilot and existing Local chats migrate when displayed. The editor-inline
exception above remains. Managed sandbox.enabled: true independently requires
Agent Host even when permissions are absent.
Testing
Test with only permissions.disableBypassPermissionsMode: "disable": full Local chats
should move to Copilot, Allow All should be unavailable, and Assisted should remain
selectable. Also test policy removal and an empty permissions object.
Resolve native approval policy in the Copilot host and advertise available and effective modes to both windows. Apply the legacy blanket only when no explicit new mode restriction is configured, retaining independent tool restrictions.
Use the same host-authoritative path on desktop and remote hosts while preserving legacy client guards for peers without approval reports.
*🤖 Authored with GitHub Copilot on behalf of @rwoll.*
Co-authored-by: Copilot <[email protected]>
Retain the reviewed SDK 1.0.18-preview.1 and runtime 1.0.94-1 while incorporating current upstream changes. The only conflicts were the older upstream SDK dependency entries.
*🤖 Authored with GitHub Copilot on behalf of @rwoll.*
Co-authored-by: Copilot <[email protected]>
Use allowed and blocked indicators matching the reviewed PR table.
*🤖 Authored with GitHub Copilot on behalf of @rwoll.*
Co-authored-by: Copilot <[email protected]>
Mark scenarios 6 and 8 in the permission matrix without changing their behavior.
*🤖 Authored with GitHub Copilot on behalf of @rwoll.*
Co-authored-by: Copilot <[email protected]>
Preserve the permission policy resolver import alongside upstream bulk questions and Mission Control changes. Validated the merged client build, typecheck, lint, and 1839 focused host tests.
*🤖 Authored with GitHub Copilot on behalf of @rwoll.*
Co-authored-by: Copilot <[email protected]>
Retain upstream provider timing and detached-service support alongside managed approval policies. Use the SDK/runtime versions already rolled on main instead of carrying a dedicated dependency bump.
🤖 Authored with GitHub Copilot on behalf of @rwoll.
Co-authored-by: Copilot <[email protected]>
Do not overwrite the actual SDK result with the requested allow-all mode after a policy-constrained response. Publish the actual applied selection consistently with ordinary synchronization.
Confirmed the bundled runtime returns success:false, mode:manual for blocked allow-all. Both new regressions failed before the fix; five focused toggle/synchronization tests and targeted lint pass.
🤖 Authored with GitHub Copilot on behalf of @rwoll.
Co-authored-by: Copilot <[email protected]>
Give launch/runtime policy snapshots, selection reconciliation, response acceptance, and applied reports one session-owned object. Keep SDK calls, sequencing, retry timing, configuration publication, and lifecycle in CopilotAgentSession.
Preserve the approved precedence matrix and recomputation/event timing, including consulting current policy after SDK calls. Add standalone transition and result-acceptance coverage.
Validation: 1113 policy/session/launcher tests passed; strict initialization/type check and targeted hygiene passed.
🤖 Authored with GitHub Copilot on behalf of @rwoll.
Co-authored-by: Copilot <[email protected]>
Keep explicit and remembered approval preferences until the host advertises its policy contract. Normalize both standard and VS Code approval bindings, wait for resolved preferences before prewarming, and retain legacy restrictions for older peers.\n\nValidate existing-session approval writes as runtime changes and let live Copilot sessions apply native-policy precedence for approval toggles.
*🤖 Authored with GitHub Copilot on behalf of @rwoll.*
Co-authored-by: Copilot <[email protected]>
Provide the new service contracts in paste and session-identity mocks. Assert config replacement over writable client values without requiring host-owned readonly reports to disappear.
*🤖 Authored with GitHub Copilot on behalf of @rwoll.*
Co-authored-by: Copilot <[email protected]>
Merge origin/main at 4bd93ff without rewriting the PR history.
*🤖 Authored with GitHub Copilot on behalf of @rwoll.*
Co-authored-by: Copilot <[email protected]>
Keep only explicit approval defaults before discovery, translate completion keys and values for standard hosts, and retain unavailable Editor choices as disabled. Surface completion write failures and cover provider-neutral defaults and acceptance paths. Clarify that legacy Local does not provide Assisted mode.
*🤖 Authored with GitHub Copilot on behalf of @rwoll.*
Co-authored-by: Copilot <[email protected]>
Include the merged automatic-migration cancellation fix and preserve both SDK type imports at the session-launcher merge boundary.
*🤖 Authored with GitHub Copilot on behalf of @rwoll.*
Co-authored-by: Copilot <[email protected]>
Route nonempty managed permissions to Copilot regardless of individual values. Preserve effective permission-key presence across delivery, observe all current native permission controls, and reuse the existing Local execution gate and automatic migration. Keep editor inline chat and legacy-only policy behavior unchanged.
*🤖 Authored with GitHub Copilot on behalf of @rwoll.*
Co-authored-by: Copilot <[email protected]>
Validate the advertised approval property and normalize effective standard modes. Publish composed availability changes while idle and dismiss stale picker choices without losing allowed draft selections.
*🤖 Authored with GitHub Copilot on behalf of @rwoll.*
Co-authored-by: Copilot <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Legacy policy can be bypassed when no approval preference exists, and standard AHP report fields are incorrectly returned in client configuration writes.
This strips host-owned approval reports only for the VS Code autoApprove alias. With the standard approvalMode binding, NewSession merges the discovered values into its follow-up resolveSessionConfig request, so availableApprovalModes/effectiveApprovalMode are sent back even though the host advertised them as read-only reports. Omit these report keys based on their read-only schema in either binding.
Re-resolve selectable approval modes for retained session config when the Copilot client starts. Preserve the last runtime-applied mode, avoid resuming chats, and discard reports superseded by a new client, resumed chat, or removed session.
*🤖 Authored with GitHub Copilot on behalf of @rwoll.*
Co-authored-by: Copilot <[email protected]>
effectiveApprovalMode is also a host-owned read-only report, but untitled sessions still let the provisional overlay override it. If the stale overlay mode remains in the host's available list, the chip and hover show the stale effective mode even after the runtime has changed it. Give both approval-report fields server precedence.
Include memory-scoped chat configuration overrides
Memory-scoped chat.defaultConfiguration overrides are omitted here. Both callers previously read the effective value (getValue() / inspect().value), where memory configuration has higher precedence than workspace and user configuration, so a temporary explicit approval default now silently falls back to a lower layer. Include inspected.memoryValue immediately after policy while still excluding defaultValue.
Discover and seed the advertised Manual binding before unseeded legacy-policy sessions can prewarm. Validate policy-report bindings, preserve memory-scoped preferences, and keep host-owned reports out of client writes for both aliases.
*🤖 Authored with GitHub Copilot on behalf of @rwoll.*
Co-authored-by: Copilot <[email protected]>
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
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.
Supersedes #340408. Builds on the automatic migration and cleanup in #340585 and #340596.
Any nonempty managed
permissionsobject now requires Copilot Agent Host, includingdefaults, explicit
false/"enable", and empty rule lists. This reuses the existingLocal chat migration without sending anything automatically.
Copilot's permission picker reflects runtime restrictions and defaults, allowing
admins to block Allow All while keeping Assisted available. Explicit new mode
restrictions replace the legacy blanket restriction;
defaultModealone does not.Empty
permissions: {}and legacy policy alone retain existing Local behavior.Editor Inline Chat keeps its limited read/edit exception. Sandboxing remains independent.
Policy behavior
Legacy
ChatToolsAutoApprove: falsewith no managed permissions still blocksboth Allow All and Assisted in Copilot Agent Host. It does not force users off
Local. A nonempty
permissionsobject determines harness eligibility; only anexplicit new mode restriction replaces the legacy blanket mode restriction.
The table shows selectable modes, not the starting selection. It assumes all
modes are supported and no additional restrictions. Legacy JSON represents policy
values, not OS-specific deployment syntax. Local does not support Assisted.
{}{}{"ChatToolsAutoApprove":false}{}{}{"permissions":{"disableBypassPermissionsMode":"disable"}}{"ChatToolsAutoApprove":false}{"permissions":{"disableBypassPermissionsMode":"disable"}}{}{"permissions":{"disableAssistedPermissionsMode":true}}{"ChatToolsAutoApprove":false}{"permissions":{"disableAssistedPermissionsMode":true}}{"ChatToolsAutoApprove":false}{"permissions":{"disableBypassPermissionsMode":"disable","disableAssistedPermissionsMode":true}}{"ChatToolsAutoApprove":false}{"permissions":{"disableBypassPermissionsMode":"enable"}}{"ChatToolsAutoApprove":false}{"permissions":{"disableAssistedPermissionsMode":false}}{}{"permissions":{"defaultMode":"assisted"}}{"ChatToolsAutoApprove":false}{"permissions":{"defaultMode":"assisted"}}{"ChatToolsAutoApprove":false}{"permissions":{"ask":[]}}permissions: {}behaves like no permissions object. Rows 6, 8, and 9 intentionallyreplace the legacy restriction with the explicitly configured new mode controls.
Rows 11 and 12 require Agent Host but retain the legacy mode restriction.
In row 10, Assisted is the starting default unless an explicit or remembered
choice takes precedence; in row 11 it is unavailable, so the default falls back
to Manual.
“Migrate to Copilot” means full Local execution is unavailable: new chats use
Copilot and existing Local chats migrate when displayed. The editor-inline
exception above remains. Managed
sandbox.enabled: trueindependently requiresAgent Host even when permissions are absent.
Testing
Test with only
permissions.disableBypassPermissionsMode: "disable": full Local chatsshould move to Copilot, Allow All should be unavailable, and Assisted should remain
selectable. Also test policy removal and an empty permissions object.
Relates #338932.
Relates https://github.com/microsoft/vscode-internalbacklog/issues/9987.
🤖 Authored with GitHub Copilot on behalf of Ross Wollman (@rwoll).