From b0da53995e6af14f8b68bcaa4cfcf49bc77bff9c Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Mon, 29 Jun 2026 12:17:11 -0700 Subject: [PATCH 1/2] AHP: opt into SDK managed-settings self-fetch 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 --- .../node/copilot/copilotSessionLauncher.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts b/src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts index 4113a13e944c89..3870347c88850d 100644 --- a/src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts +++ b/src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts @@ -59,6 +59,13 @@ type PostToolUseHookInput = Parameters Date: Wed, 8 Jul 2026 13:23:04 -0700 Subject: [PATCH 2/2] rename setting to match SDK --- .../platform/agentHost/node/copilot/copilotSessionLauncher.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts b/src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts index 3870347c88850d..3a6f53821a09b6 100644 --- a/src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts +++ b/src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts @@ -65,7 +65,7 @@ type CopilotSessionLaunchConfig = ResumeSessionConfig & { * it on `SessionConfigBase`; it is forwarded to `createSession` and read by the * runtime at runtime regardless of the published SDK's static type. */ - readonly selfFetchManagedSettings?: boolean; + readonly enableManagedSettings?: boolean; }; /** @@ -421,7 +421,7 @@ export class CopilotSessionLauncher implements ICopilotSessionLauncher { // the session's gitHubToken to call /copilot_internal/managed_settings // and enforces the result fail-closed before the first turn. // Typed locally on CopilotSessionLaunchConfig pending the SDK type update. - selfFetchManagedSettings: true, + enableManagedSettings: true, }; } }