github / github/copilot-cli

Automatic managed-settings refresh breaks IDE MCP reload and disables /allow-all

未关闭
#4,847 2 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

triage
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

Describe the bug

In a long-running Copilot CLI session connected to Visual Studio Code, an automatic managed-settings refresh can fail while reloading the dynamically contributed IDE MCP server:

Failed to enforce managed Computer Use policy: failed to reload Computer Use
plugin contributions for session '<redacted>':
MCP reload failed: mcpServers.ide.type: Invalid literal value

After this failure, the session enters a fail-closed permission state even though the resolved enterprise policy does not disable permission bypass. /allow-all and /yolo can no longer be enabled, and every tool call requires approval. Restarting Copilot CLI restores normal behavior.

This has occurred in multiple long-running sessions.

Affected version

GitHub Copilot CLI 1.0.84-6

The installed binary has since updated to 1.0.84-8; the failure has not yet been reproduced there.

Steps to reproduce the behavior

  1. Start Copilot CLI on Windows from a VS Code-integrated environment.
  2. Enable /allow-all or /yolo.
  3. Keep the session active until the automatic managed-settings refresh runs.
  4. Observe the IDE MCP graph reload fail with mcpServers.ide.type: Invalid literal value.
  5. Run /allow-all or /yolo again.
  6. Observe that permission escalation is rejected and subsequent tool calls prompt individually.
  7. Restart Copilot CLI.
  8. Observe that permissions and MCP tools work normally again.

The failure may be timing-dependent. In the captured occurrence, it happened exactly one hour after the CLI process started.

Expected behavior

The periodic managed-settings refresh should accept the IDE-provided MCP transport configuration and preserve the existing MCP graph. If applying refreshed settings fails, a policy that explicitly allows bypass permissions should not be replaced by the restrictive "policy undetermined" state for the lifetime of the process.

Additional context

  • OS: Microsoft Windows 10.0.26200, x64
  • Shell: PowerShell 7.6.6
  • IDE: Visual Studio Code
  • No user-defined mcpServers existed in the CLI config.json or settings.json.
  • The IDE bridge was registered through a Windows named pipe.
  • Sanitized log sequence:
[managedSettings] effective policy resolved:
  source=mdm, bypassDisabled=false, serverFetchFailed=false
[managedSettings] applied: no bypass restriction in force
mcp graph load: reload {"force":true}
[managedSettings] applied: bypass-permissions mode DISABLED
  (fail-closed: policy could not be determined)
[managedSettings] self-fetch errored:
  MCP reload failed: mcpServers.ide.type: Invalid literal value
Managed Computer Use plugin activation remains unreconciled {"attempts":3}

The public MCP configuration types are local/stdio and http/sse. This looks like a transient IDE bridge transport value (possibly the named-pipe transport) is being passed through generic MCP configuration validation during the forced reload.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,使用报告的 mcpServers.ide.type: Invalid literal value 序列,追踪 Windows VS Code 集成 CLI 中 managed-settings 的自动刷新以及强制重新加载 MCP 图。比较版本 1.0.84-6 和 1.0.84-8 之间的行为,并在启用 /allow-all/yolo 的情况下重现。完成标准是 IDE 的 MCP 配置能够成功重新加载,并且允许的绕过策略不会被 fail-closed 状态替换。

由索引模型根据 Issue 内容生成。

评估

技术栈
powershell, shell, vscode
领域
cli, security, tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。