Skip to content

AHP: opt into SDK managed-settings self-fetch#323651

Draft
joshspicer wants to merge 1 commit into
mainfrom
agents/managed-settings-ahp-opt-in
Draft

AHP: opt into SDK managed-settings self-fetch#323651
joshspicer wants to merge 1 commit into
mainfrom
agents/managed-settings-ahp-opt-in

Conversation

@joshspicer

@joshspicer joshspicer commented Jun 30, 2026

Copy link
Copy Markdown
Member

AHP: opt into SDK managed-settings self-fetch

see https://github.com/github/copilot-sdk-internal/issues/206

The Agent Host session launcher passes selfFetchManagedSettings: true when creating a Copilot SDK session, so the runtime self-fetches and enforces enterprise managed settings (bypass-permissions policy) using the session's GitHub token — no enforcement logic lives in VS Code.

  • src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts — set selfFetchManagedSettings: true in _buildSessionConfig. Typed via the SDK's SessionConfigBase (see SDK PR).

Related PRs


⚠️ Draft — part of a 3-repo change (runtime + SDK + VS Code).

Copilot AI review requested due to automatic review settings June 30, 2026 01:19

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.

Pull request overview

This PR updates the Agent Host (AHP) Copilot session launcher to opt Copilot SDK sessions into runtime-managed enterprise policy enforcement by enabling the SDK/session flag for self-fetching managed settings at bootstrap time.

Changes:

  • Enable selfFetchManagedSettings: true in the session config built by CopilotSessionLauncher.
  • Document (in-code) that the runtime will self-fetch managed settings and enforce them before the first turn.
Show a summary per file
File Description
src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts Adds selfFetchManagedSettings: true to the SDK session config built during session launch.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment on lines +413 to +417
// Opt the runtime into self-fetching enterprise managed settings
// (bypass-permissions policy) at session bootstrap. The runtime uses
// the session's gitHubToken to call /copilot_internal/managed_settings
// and enforces the result fail-closed before the first turn.
// Declared in copilotSdkAugmentation.d.ts pending SDK type update.
Pass selfFetchManagedSettings:true in session.create params so the
runtime self-fetches enterprise bypass-permissions policy from the
GitHub managed_settings endpoint at session bootstrap. The runtime
enforces the result fail-closed before the first turn.

Requires: github/copilot-agent-runtime#agents/managed-settings-sdk-capability
@joshspicer joshspicer force-pushed the agents/managed-settings-ahp-opt-in branch from 18ffce7 to b0da539 Compare June 30, 2026 20:35
@github-actions

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 2d86237d Current: 0e00bbb7

Added (103)

editor/inlineCompletions/views/SideBySideViewWide/Light

current

editor/inlineCompletions/views/WordReplacementView/Dark

current

editor/inlineCompletions/views/WordReplacementView/Light

current

editor/inlineCompletions/views/DeletionView/Dark

current

editor/inlineCompletions/views/DeletionView/Light

current

editor/inlineCompletions/views/LineReplacementView/Dark

current

editor/inlineCompletions/views/LineReplacementView/Light

current

editor/multiDiffEditor/MultiDiffEditor/Dark

current

editor/multiDiffEditor/MultiDiffEditor/Light

current

editor/multiDiffEditor/MultiDiffEditorIncrementalPending/Dark

current

editor/multiDiffEditor/MultiDiffEditorIncrementalPending/Light

current

editor/multiDiffEditor/MultiDiffEditorIncrementalResolved/Dark

current

editor/multiDiffEditor/MultiDiffEditorIncrementalResolved/Light

current

editor/multiDiffEditor/MultiDiffEditorDocumentSwapBefore/Dark

current

editor/multiDiffEditor/MultiDiffEditorDocumentSwapBefore/Light

current

editor/multiDiffEditor/MultiDiffEditorDocumentSwapAfter/Dark

current

editor/multiDiffEditor/MultiDiffEditorDocumentSwapAfter/Light

current

editor/suggestWidget/MethodCompletions/Dark

current

editor/suggestWidget/MethodCompletions/Light

current

editor/suggestWidget/MixedKinds/Dark

current

editor/suggestWidget/MixedKinds/Light

current

peekReference/PeekReferences/Dark

current

peekReference/PeekReferences/Light

current

imageCarousel/imageCarousel/SingleSection/Dark

current

imageCarousel/imageCarousel/SingleSection/Light

current

imageCarousel/imageCarousel/SingleSectionMiddleImage/Dark

current

imageCarousel/imageCarousel/SingleSectionMiddleImage/Light

current

imageCarousel/imageCarousel/MultipleSections/Dark

current

imageCarousel/imageCarousel/MultipleSections/Light

current

imageCarousel/imageCarousel/SingleImage/Dark

current

imageCarousel/imageCarousel/SingleImage/Light

current

onboarding/spotlightOverlay/SpotlightOverlay/Dark

current

onboarding/spotlightOverlay/SpotlightOverlay/Light

current

agentSessionsViewer/CompletedRead/Dark

current

agentSessionsViewer/CompletedRead/Light

current

agentSessionsViewer/CompletedUnread/Dark

current

agentSessionsViewer/CompletedUnread/Light

current

agentSessionsViewer/InProgress/Dark

current

agentSessionsViewer/InProgress/Light

current

agentSessionsViewer/NeedsInput/Dark

current

agentSessionsViewer/NeedsInput/Light

current

agentSessionsViewer/FailedWithDuration/Dark

current

agentSessionsViewer/FailedWithDuration/Light

current

agentSessionsViewer/FailedWithoutDuration/Dark

current

agentSessionsViewer/FailedWithoutDuration/Light

current

agentSessionsViewer/WithDiffChanges/Dark

current

agentSessionsViewer/WithDiffChanges/Light

current

agentSessionsViewer/WithFileChangesList/Dark

current

agentSessionsViewer/WithFileChangesList/Light

current

agentSessionsViewer/WithBadge/Dark

current

agentSessionsViewer/WithBadge/Light

current

agentSessionsViewer/WithMarkdownBadge/Dark

current

agentSessionsViewer/WithMarkdownBadge/Light

current

agentSessionsViewer/WithDescription/Dark

current

agentSessionsViewer/WithDescription/Light

current

agentSessionsViewer/WithMarkdownDescription/Dark

current

agentSessionsViewer/WithMarkdownDescription/Light

current

agentSessionsViewer/WithBadgeAndDiff/Dark

current

agentSessionsViewer/WithBadgeAndDiff/Light

current

agentSessionsViewer/Archived/Dark

current

agentSessionsViewer/Archived/Light

current

agentSessionsViewer/ArchivedUnread/Dark

current

agentSessionsViewer/ArchivedUnread/Light

current

agentSessionsViewer/CloudProvider/Dark

current

agentSessionsViewer/CloudProvider/Light

current

agentSessionsViewer/BackgroundProvider/Dark

current

agentSessionsViewer/BackgroundProvider/Light

current

agentSessionsViewer/ClaudeProvider/Dark

current

agentSessionsViewer/ClaudeProvider/Light

current

agentSessionsViewer/CloudProviderInProgress/Dark

current

agentSessionsViewer/CloudProviderInProgress/Light

current

agentSessionsViewer/InProgressWithDescription/Dark

current

agentSessionsViewer/InProgressWithDescription/Light

current

agentSessionsViewer/SectionToday/Dark

current

agentSessionsViewer/SectionToday/Light

current

agentSessionsViewer/SectionYesterday/Dark

current

agentSessionsViewer/SectionYesterday/Light

current

agentSessionsViewer/SectionLastWeek/Dark

current

agentSessionsViewer/SectionLastWeek/Light

current

agentSessionsViewer/SectionOlder/Dark

current

agentSessionsViewer/SectionOlder/Light

current

agentSessionsViewer/SectionArchived/Dark

current

agentSessionsViewer/SectionArchived/Light

current

agentSessionsViewer/SectionMore/Dark

current

agentSessionsViewer/SectionMore/Light

current

agentSessionsViewer/ApprovalRowJson/Dark

current

agentSessionsViewer/ApprovalRowJson/Light

current

agentSessionsViewer/ApprovalRowBash/Dark

current

agentSessionsViewer/ApprovalRowBash/Light

current

agentSessionsViewer/ApprovalRowPowerShell/Dark

current

agentSessionsViewer/ApprovalRowPowerShell/Light

current

agentSessionsViewer/ApprovalRowLongLabel/Dark

current

agentSessionsViewer/ApprovalRowLongLabel/Light

current

agentSessionsViewer/ApprovalRow1Line/Dark

current

agentSessionsViewer/ApprovalRow1Line/Light

current

agentSessionsViewer/ApprovalRow2Lines/Dark

current

agentSessionsViewer/ApprovalRow2Lines/Light

current

agentSessionsViewer/ApprovalRow3Lines/Dark

current

agentSessionsViewer/ApprovalRow3Lines/Light

current

agentSessionsViewer/ApprovalRow4Lines/Dark

current

agentSessionsViewer/ApprovalRow4Lines/Light

current

agentSessionsViewer/ApprovalRow3LongLines/Dark

current

agentSessionsViewer/ApprovalRow3LongLines/Light

current

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.

2 participants