Skip to content

Error executing prompt: Error: Managed sandbox policy changed during options update; retry the update #5360

Closed

Description

@amitamit281

Describe the bug

I am in enterprise environment.

copilot -p "Hi"
Error executing prompt: Error: Managed sandbox policy changed during options update; retry the update

2026-11-05T05:21:02.836Z [INFO] Shell completions: no writable completion directory found for zsh, skipping
2026-11-05T05:21:02.836Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] device MDM: no policy present on this device
2026-11-05T05:21:02.836Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] server policy fetch skipped: no authenticated GitHub host available
2026-11-05T05:21:02.837Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] effective policy resolved: source=none, bypassDisabled=false, serverFetchFailed=false, policyHelperConfigured=false, policyHelperAuthority=none, policyHelperFailed=false, policyHelperFailClosed=false, policyHelperContributedSandbox=false
2026-11-05T05:21:03.111Z [WARNING] [rust:rt_network::tls_certs] Ignoring distrusted emSign ECC Root CA - G3 trust anchor
2026-11-05T05:21:04.638Z [INFO] CAFE metrics are paused because no supported endpoint is available
2026-11-05T05:21:04.638Z [WARNING] [rust:rt_network::tls_certs] Ignoring distrusted emSign ECC Root CA - G3 trust anchor
2026-11-05T05:21:04.638Z [WARNING] [rust:rt_network::tls_certs] Ignoring distrusted emSign ECC Root CA - G3 trust anchor
2026-11-05T05:21:04.639Z [INFO] CAFE metrics endpoint became available
2026-11-05T05:21:04.641Z [WARNING] [rust:rt_network::tls_certs] Ignoring distrusted emSign ECC Root CA - G3 trust anchor
2026-11-05T05:21:05.527Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] device MDM: no policy present on this device
2026-11-05T05:21:05.527Z [WARNING] [rust:copilot_runtime::storage::managed_settings] permissions.model has an unsupported or malformed value and was ignored.
2026-11-05T05:21:05.527Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] server policy received from https://github.com: bypassDisabled=true, keys=[model,permissions,remoteControl,telemetry,sandbox]
2026-11-05T05:21:05.527Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] effective policy resolved: source=server, bypassDisabled=true, serverFetchFailed=false, policyHelperConfigured=false, policyHelperAuthority=none, policyHelperFailed=false, policyHelperFailClosed=false, policyHelperContributedSandbox=false
2026-11-05T05:21:05.532Z [INFO] Session indexing debug: SESSION_INDEXING=true, repository=undefined
2026-11-05T05:21:05.532Z [INFO] [rust:otel] OpenTelemetry configured from managed settings: exporter=otlp-http, source=github.copilot {"capture_identity":false,"capture_prompts":false,"capture_responses":false,"capture_tool_arguments":false,"capture_tool_output":false,"capture_policy_detail":false}
2026-11-05T05:21:05.560Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] device MDM: no policy present on this device
2026-11-05T05:21:05.560Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] effective policy resolved: source=none, bypassDisabled=false, serverFetchFailed=false, policyHelperConfigured=false, policyHelperAuthority=none, policyHelperFailed=false, policyHelperFailClosed=false, policyHelperContributedSandbox=false
2026-11-05T05:21:05.580Z [INFO] [rust:copilot_runtime::shared_api::permissions] [managedSettings] applied: no bypass restriction in force (managed policy absent)
2026-11-05T05:21:05.582Z [INFO] [rust:copilot_runtime::shared_api::permissions] [managedSettings] applied: no bypass restriction in force (managed policy absent)
2026-11-05T05:21:05.582Z [WARNING] [rust:copilot_runtime::session::api_session_options_update] Failed to reload managed hooks after enabling managed settings {"error":"no hook session for session id ec0e5738-ab1f-4bc4-8c6a-ff59c7ed2f4e"}
2026-11-05T05:21:05.582Z [INFO] [rust:copilot_runtime::managed_settings::api_session] [managedSettings] self-fetch starting for account (device)
2026-11-05T05:21:05.582Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] device MDM: no policy present on this device
2026-11-05T05:21:05.582Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] server policy fetch skipped: no authenticated GitHub host available
2026-11-05T05:21:05.582Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] effective policy resolved: source=none, bypassDisabled=false, serverFetchFailed=false, policyHelperConfigured=false, policyHelperAuthority=none, policyHelperFailed=false, policyHelperFailClosed=false, policyHelperContributedSandbox=false
2026-11-05T05:21:05.582Z [INFO] [rust:copilot_runtime::shared_api::permissions] [managedSettings] applied: no bypass restriction in force (managed policy absent)
2026-11-05T05:21:05.583Z [INFO] [rust:rt_tgrep] tgrep status changed {"status":"server-not-running"}
2026-11-05T05:21:05.583Z [INFO] [rust:copilot_runtime::managed_settings::api_session] [managedSettings] self-fetch complete for (device): bypassDisabled=false, serverFetchFailed=false, serverResolution=Live, serverRetryableFailure=false, deviceLoadFailed=false
2026-11-05T05:21:05.583Z [WARNING] [rust:events_engine::host_delivery] event was not delivered to its registered session host {"error":"GenericFailure, no session host is registered for session ec0e5738-ab1f-4bc4-8c6a-ff59c7ed2f4e"}
2026-11-05T05:21:05.588Z [INFO] Workspace initialized: ec0e5738-ab1f-4bc4-8c6a-ff59c7ed2f4e (checkpoints: 0)
2026-11-05T05:21:05.605Z [INFO] [rust:copilot_runtime::shared_api::permissions] [managedSettings] applied: no bypass restriction in force (managed policy absent)
2026-11-05T05:21:05.605Z [INFO] [rust:copilot_runtime::managed_settings::api_session] [managedSettings] self-fetch starting for account https://github.com/xxxxxxxx
2026-11-05T05:21:05.607Z [INFO] [rust:rt_tgrep] tgrep status changed {"status":"server-not-running"}
2026-11-05T05:21:05.616Z [INFO] Starting Copilot CLI: 1.0.105
2026-11-05T05:21:05.616Z [INFO] Node.js version: v24.22.1
2026-11-05T05:21:05.616Z [INFO] CAFE metrics are paused because no supported endpoint is available
2026-11-05T05:21:05.616Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] device MDM: no policy present on this device
2026-11-05T05:21:05.616Z [WARNING] [rust:copilot_runtime::storage::managed_settings] permissions.model has an unsupported or malformed value and was ignored.
2026-11-05T05:21:05.616Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] server policy served from fresh cache (age 90ms) for https://github.com: bypassDisabled=true, keys=[model,permissions,remoteControl,telemetry,sandbox]
2026-11-05T05:21:05.616Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] effective policy resolved: source=server, bypassDisabled=true, serverFetchFailed=false, policyHelperConfigured=false, policyHelperAuthority=none, policyHelperFailed=false, policyHelperFailClosed=false, policyHelperContributedSandbox=false
2026-11-05T05:21:05.617Z [INFO] CAFE metrics endpoint became available
2026-11-05T05:21:05.629Z [INFO] [rust:managed_policy] managed permission policy now caps bypass-permissions escalation (approve-all, unrestricted paths/URLs) {"bypass_blocked":true}
2026-11-05T05:21:05.629Z [INFO] [rust:copilot_runtime::shared_api::permissions] [managedSettings] applied: bypass-permissions mode DISABLED by enterprise policy — /allow-all and permission escalation are now blocked
2026-11-05T05:21:05.634Z [INFO] [rust:otel] OTel session policy applied
2026-11-05T05:21:05.637Z [INFO] [rust:copilot_runtime::managed_settings::api_session] [managedSettings] self-fetch complete for https://github.com/xxxxxxxx: bypassDisabled=true, serverFetchFailed=false, serverResolution=FreshCache, serverRetryableFailure=false, deviceLoadFailed=false
2026-11-05T05:21:05.642Z [INFO] [rust:otel] OpenTelemetry tracker created for session ec0e5738-ab1f-4bc4-8c6a-ff59c7ed2f4e
2026-11-05T05:21:05.643Z [ERROR] Error executing prompt: Error: Managed sandbox policy changed during options update; retry the update
2026-11-05T05:21:05.647Z [INFO] [rust:copilot_runtime::session::registry] Closed interrupted sub-agent records on resume {"closed":0,"dangling":0}
2026-11-05T05:21:05.656Z [ERROR] SessionClient poll loop error (will retry): Error: Cannot invoke native session after disposal has started
2026-11-05T05:21:06.087Z [WARNING] Best-effort plugin preparation skipped 1 item.
2026-11-05T05:21:06.088Z [WARNING] Best-effort plugin preparation skipped 1 item.
2026-11-05T05:21:06.659Z [ERROR] SessionClient poll loop error (will retry): Error: Cannot invoke native session after disposal has started
2026-11-05T05:21:07.660Z [ERROR] SessionClient poll loop error (will retry): Error: Cannot invoke native session after disposal has started

Affected version

GitHub Copilot CLI 1.0.105.

Steps to reproduce the behavior

copilot -p "Hi"
Error executing prompt: Error: Managed sandbox policy changed during options update; retry the update

2026-11-05T05:21:02.836Z [INFO] Shell completions: no writable completion directory found for zsh, skipping
2026-11-05T05:21:02.836Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] device MDM: no policy present on this device
2026-11-05T05:21:02.836Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] server policy fetch skipped: no authenticated GitHub host available
2026-11-05T05:21:02.837Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] effective policy resolved: source=none, bypassDisabled=false, serverFetchFailed=false, policyHelperConfigured=false, policyHelperAuthority=none, policyHelperFailed=false, policyHelperFailClosed=false, policyHelperContributedSandbox=false
2026-11-05T05:21:03.111Z [WARNING] [rust:rt_network::tls_certs] Ignoring distrusted emSign ECC Root CA - G3 trust anchor
2026-11-05T05:21:04.638Z [INFO] CAFE metrics are paused because no supported endpoint is available
2026-11-05T05:21:04.638Z [WARNING] [rust:rt_network::tls_certs] Ignoring distrusted emSign ECC Root CA - G3 trust anchor
2026-11-05T05:21:04.638Z [WARNING] [rust:rt_network::tls_certs] Ignoring distrusted emSign ECC Root CA - G3 trust anchor
2026-11-05T05:21:04.639Z [INFO] CAFE metrics endpoint became available
2026-11-05T05:21:04.641Z [WARNING] [rust:rt_network::tls_certs] Ignoring distrusted emSign ECC Root CA - G3 trust anchor
2026-11-05T05:21:05.527Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] device MDM: no policy present on this device
2026-11-05T05:21:05.527Z [WARNING] [rust:copilot_runtime::storage::managed_settings] permissions.model has an unsupported or malformed value and was ignored.
2026-11-05T05:21:05.527Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] server policy received from https://github.com: bypassDisabled=true, keys=[model,permissions,remoteControl,telemetry,sandbox]
2026-11-05T05:21:05.527Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] effective policy resolved: source=server, bypassDisabled=true, serverFetchFailed=false, policyHelperConfigured=false, policyHelperAuthority=none, policyHelperFailed=false, policyHelperFailClosed=false, policyHelperContributedSandbox=false
2026-11-05T05:21:05.532Z [INFO] Session indexing debug: SESSION_INDEXING=true, repository=undefined
2026-11-05T05:21:05.532Z [INFO] [rust:otel] OpenTelemetry configured from managed settings: exporter=otlp-http, source=github.copilot {"capture_identity":false,"capture_prompts":false,"capture_responses":false,"capture_tool_arguments":false,"capture_tool_output":false,"capture_policy_detail":false}
2026-11-05T05:21:05.560Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] device MDM: no policy present on this device
2026-11-05T05:21:05.560Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] effective policy resolved: source=none, bypassDisabled=false, serverFetchFailed=false, policyHelperConfigured=false, policyHelperAuthority=none, policyHelperFailed=false, policyHelperFailClosed=false, policyHelperContributedSandbox=false
2026-11-05T05:21:05.580Z [INFO] [rust:copilot_runtime::shared_api::permissions] [managedSettings] applied: no bypass restriction in force (managed policy absent)
2026-11-05T05:21:05.582Z [INFO] [rust:copilot_runtime::shared_api::permissions] [managedSettings] applied: no bypass restriction in force (managed policy absent)
2026-11-05T05:21:05.582Z [WARNING] [rust:copilot_runtime::session::api_session_options_update] Failed to reload managed hooks after enabling managed settings {"error":"no hook session for session id ec0e5738-ab1f-4bc4-8c6a-ff59c7ed2f4e"}
2026-11-05T05:21:05.582Z [INFO] [rust:copilot_runtime::managed_settings::api_session] [managedSettings] self-fetch starting for account (device)
2026-11-05T05:21:05.582Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] device MDM: no policy present on this device
2026-11-05T05:21:05.582Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] server policy fetch skipped: no authenticated GitHub host available
2026-11-05T05:21:05.582Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] effective policy resolved: source=none, bypassDisabled=false, serverFetchFailed=false, policyHelperConfigured=false, policyHelperAuthority=none, policyHelperFailed=false, policyHelperFailClosed=false, policyHelperContributedSandbox=false
2026-11-05T05:21:05.582Z [INFO] [rust:copilot_runtime::shared_api::permissions] [managedSettings] applied: no bypass restriction in force (managed policy absent)
2026-11-05T05:21:05.583Z [INFO] [rust:rt_tgrep] tgrep status changed {"status":"server-not-running"}
2026-11-05T05:21:05.583Z [INFO] [rust:copilot_runtime::managed_settings::api_session] [managedSettings] self-fetch complete for (device): bypassDisabled=false, serverFetchFailed=false, serverResolution=Live, serverRetryableFailure=false, deviceLoadFailed=false
2026-11-05T05:21:05.583Z [WARNING] [rust:events_engine::host_delivery] event was not delivered to its registered session host {"error":"GenericFailure, no session host is registered for session ec0e5738-ab1f-4bc4-8c6a-ff59c7ed2f4e"}
2026-11-05T05:21:05.588Z [INFO] Workspace initialized: ec0e5738-ab1f-4bc4-8c6a-ff59c7ed2f4e (checkpoints: 0)
2026-11-05T05:21:05.605Z [INFO] [rust:copilot_runtime::shared_api::permissions] [managedSettings] applied: no bypass restriction in force (managed policy absent)
2026-11-05T05:21:05.605Z [INFO] [rust:copilot_runtime::managed_settings::api_session] [managedSettings] self-fetch starting for account https://github.com/xxxxxxxx
2026-11-05T05:21:05.607Z [INFO] [rust:rt_tgrep] tgrep status changed {"status":"server-not-running"}
2026-11-05T05:21:05.616Z [INFO] Starting Copilot CLI: 1.0.105
2026-11-05T05:21:05.616Z [INFO] Node.js version: v24.22.1
2026-11-05T05:21:05.616Z [INFO] CAFE metrics are paused because no supported endpoint is available
2026-11-05T05:21:05.616Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] device MDM: no policy present on this device
2026-11-05T05:21:05.616Z [WARNING] [rust:copilot_runtime::storage::managed_settings] permissions.model has an unsupported or malformed value and was ignored.
2026-11-05T05:21:05.616Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] server policy served from fresh cache (age 90ms) for https://github.com: bypassDisabled=true, keys=[model,permissions,remoteControl,telemetry,sandbox]
2026-11-05T05:21:05.616Z [INFO] [rust:copilot_runtime::storage::managed_settings] [managedSettings] effective policy resolved: source=server, bypassDisabled=true, serverFetchFailed=false, policyHelperConfigured=false, policyHelperAuthority=none, policyHelperFailed=false, policyHelperFailClosed=false, policyHelperContributedSandbox=false
2026-11-05T05:21:05.617Z [INFO] CAFE metrics endpoint became available
2026-11-05T05:21:05.629Z [INFO] [rust:managed_policy] managed permission policy now caps bypass-permissions escalation (approve-all, unrestricted paths/URLs) {"bypass_blocked":true}
2026-11-05T05:21:05.629Z [INFO] [rust:copilot_runtime::shared_api::permissions] [managedSettings] applied: bypass-permissions mode DISABLED by enterprise policy — /allow-all and permission escalation are now blocked
2026-11-05T05:21:05.634Z [INFO] [rust:otel] OTel session policy applied
2026-11-05T05:21:05.637Z [INFO] [rust:copilot_runtime::managed_settings::api_session] [managedSettings] self-fetch complete for https://github.com/xxxxxxxx: bypassDisabled=true, serverFetchFailed=false, serverResolution=FreshCache, serverRetryableFailure=false, deviceLoadFailed=false
2026-11-05T05:21:05.642Z [INFO] [rust:otel] OpenTelemetry tracker created for session ec0e5738-ab1f-4bc4-8c6a-ff59c7ed2f4e
2026-11-05T05:21:05.643Z [ERROR] Error executing prompt: Error: Managed sandbox policy changed during options update; retry the update
2026-11-05T05:21:05.647Z [INFO] [rust:copilot_runtime::session::registry] Closed interrupted sub-agent records on resume {"closed":0,"dangling":0}
2026-11-05T05:21:05.656Z [ERROR] SessionClient poll loop error (will retry): Error: Cannot invoke native session after disposal has started
2026-11-05T05:21:06.087Z [WARNING] Best-effort plugin preparation skipped 1 item.
2026-11-05T05:21:06.088Z [WARNING] Best-effort plugin preparation skipped 1 item.
2026-11-05T05:21:06.659Z [ERROR] SessionClient poll loop error (will retry): Error: Cannot invoke native session after disposal has started
2026-11-05T05:21:07.660Z [ERROR] SessionClient poll loop error (will retry): Error: Cannot invoke native session after disposal has started

Expected behavior

it should return the response

Additional context

Darwin xxxxxxxxxxxx 25.6.0 Darwin Kernel Version 25.6.0: Tue Aug 18 17:49:13 PDT 2026; root:xnu-12377.161.15.700.19~2/RELEASE_ARM64_T6000 arm64

Activity

  1. added theissue type on Nov 5, 2026
  2. self-assigned this
    on Nov 5, 2026
  3. caarlos0 commented on Nov 5, 2026

    @caarlos0
    Member

    The managed-sandbox policy update race is fixed and will be included in the next stable version. The fix is already available in prerelease v1.0.106-10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions