跳到主内容
@wquguru
精选88Claude Code(GitHub Releases)AI 编程与模型

Claude Code v2.1.259:新增组织MCP托管与无头权限控制,修复会话冲突及多项Bug

v2.1.259

原文
发到 X
推荐理由

本次更新包含破坏性逻辑变更(allowedMcpServers 行为改变)和关键安全/稳定性修复(并发会话数据覆盖、Agent 状态失控)。涉及组织级 MCP 管控策略调整,建议管理员检查配置并升级以规避潜在风险。

What's changed

变更内容

  • Added managedMcpServers managed setting: organizations can provide HTTP/SSE MCP servers to every user (same entry shape as .mcp.json); entries that name a command to run are skipped
  • Added --permission-prompts none for unattended headless hosts: anything that would prompt is denied automatically while the active permission mode (including auto mode) keeps deciding
  • Added recognition of glab mr create/merge/close/reopen/note/update so GitLab merge requests show as MR !N in the collapsed tool summary and refresh the footer MR badge
  • Added --json to claude plugin validate for a machine-readable validation report
  • Fixed concurrent sessions silently reverting each other's ~/.claude.json changes — workspace trust no longer resets and MCP/project state is no longer lost when running many sessions at once
  • Fixed a conversation whose thinking was rejected once being rejected again on every later turn
  • Fixed Bash Read() deny rules not covering files given as option values (--ignore-revs-file=.env, -f.env, @file), git diff/git grep file operands, or cd DIR && cat FILE compounds; grep -r/cp -r over a directory holding a denied file now asks
  • Fixed the prompt cache being invalidated when the OAuth token refreshed in sessions with telemetry disabled
  • Fixed fullscreen mode showing a blank conversation after a long turn with hundreds of tool calls
  • Fixed auto mode running a turn on a model it doesn't support when a command or skill's frontmatter model: named one; the turn now keeps the session model
  • Fixed CLAUDE_CODE_MAX_CONTEXT_TOKENS being ignored for Vertex-style model IDs (@YYYYMMDD suffix) of model versions Claude Code doesn't recognize
  • Fixed the live output preview of a running shell command hiding its newest lines when an earlier line wrapped
  • Fixed a background GitHub connection check that ran on every launch for claude.ai users; the result is now remembered across launches
  • Fixed --resume failing (and --continue opening an empty conversation) when a saved session contains an attachment entry with no payload
  • Fixed frontmatter model: on custom commands and skills being ignored in interactive sessions
  • Fixed Artifact publishing failing once with an "unexpected parameter note" error in conversations continued from an older version
  • Fixed managed forceRemoteSettingsRefresh being ignored at startup when a policy helper configured by MDM or the managed settings file had already run
  • Fixed worktree isolation refusing hook-created worktrees on machines where git rev-parse fails with a message other than "not a git repository"
  • Fixed OpenTelemetry metrics and events from cloud sessions missing the user.email, organization.id, and user.account_uuid attributes
  • Fixed MCP servers that disconnect while their tools are being listed at startup showing as connected with no tools instead of reporting the error
  • Fixed the file edit permission dialog sometimes showing a changed line cut short with no indication
  • Fixed repository detection dropping a known repo identity after a transient git probe failure
  • Fixed managed settings silently going unenforced when the managed-settings file, a drop-in, the MDM plist, or the HKLM value cannot be parsed: Claude Code now refuses to start and names the source
  • Fixed Stop not actually stopping background agents and workflows in remote-control sessions: killed tasks now stay visible and re-stoppable until their processes exit
  • Fixed resuming a workflow run while its previous stopped run was still exiting, which could run duplicate copies of its agents
  • Fixed marketplace repo URLs on github.com with a trailing slash or dangling ?/# producing an unusable .git clone URL
  • Fixed blocking Stop hooks causing the turn after a block to lose the model's reasoning from that turn and, on some models, miss the prompt cache
  • Fixed remote (claude.ai) sessions taking 60 seconds to start a turn after a browser-hosted MCP server's page had gone away
  • Fixed worktree-isolated sessions refusing common Bash loops, xargs pipelines and launcher-wrapped commands that cannot reach the main checkout
  • Improved terminal resize and first-render performance for long responses by reusing text measurements
  • Improved /workflows agent detail: JSON outcomes are pretty-printed with syntax colors and real line breaks, and long outcomes fold behind an expand toggle
  • Improved headless/SDK session start: the first turn begins up to 50 ms sooner when MCP servers finish connecting
  • Improved /install-github-app to explain it is GitHub-only and point to the GitLab CI/CD docs when run inside a GitLab repository
  • Improved nested background subagent results to be saved in the parent subagent's transcript, so resumed subagents keep them and shared transcripts show the delivery
  • Changed allowedMcpServers to govern only servers users add: a literal managed-mcp.json server your allowlist used to filter out now loads on upgrade; use deniedMcpServers to keep it off
  • [VSCode] Added an Active quick filter and a status filter menu (Needs input, Working, Completed) to the session list sidebar
  • Fixed remote and scheduled sessions doing nothing after a connector-tool permission prompt was approved while the session was paused
  • 新增 managedMcpServers 托管设置:组织可以向所有用户提供 HTTP/SSE MCP 服务器(条目格式与 .mcp.json 相同);指定要运行的命令的条目将被跳过
  • 为无人值守的无头主机新增 --permission-prompts none 选项:任何需要提示的操作都会自动被拒绝,同时活动权限模式(包括自动模式)继续做出决策
  • 新增对 glab mr create/merge/close/reopen/note/update 的识别,使 GitLab 合并请求在折叠的工具摘要中显示为 MR !N,并刷新页脚的 MR 徽章
  • 为 claude 插件 validate 命令新增 --json 参数,以生成机器可读的验证报告
  • 修复了并发会话静默互相回退 ~/.claude.json 更改的问题——工作区信任不再重置,且同时运行多个会话时不再丢失 MCP/项目状态
  • 修复了在思考过程被拒绝后,后续每次交互都再次被拒绝的问题
  • 修复了 Bash Read() 拒绝规则未覆盖作为选项值提供的文件(--ignore-revs-file=.env、-f.env、@file)、git diff/git grep 文件操作数,或 cd DIR && cat FILE 组合命令的情况;当目录中包含被拒绝的文件时,grep -r/cp -r 现在会进行询问
  • 修复了在禁用遥测的会话中 OAuth 令牌刷新导致提示缓存失效的问题
  • 修复了在包含数百次工具调用的长轮次后,全屏模式下显示空白对话的问题
  • 修复了当命令或技能的 frontmatter model: 指定了不支持该模型时,自动模式仍会在该模型上运行轮次的问题;现在轮次将保持使用会话模型
  • 修复了 CLAUDE_CODE_MAX_CONTEXT_TOKENS 对 Claude Code 无法识别的版本后缀为 @YYYYMMDD 的 Vertex 风格模型 ID 被忽略的问题
  • 修复了正在运行的 shell 命令的实时输出预览在较早行发生换行时隐藏最新行的问题
  • 修复了 claude.ai 用户每次启动时都会运行的后台 GitHub 连接检查问题;现在结果将在多次启动之间被记住
  • 修复了当保存的会话包含没有有效负载的附件条目时,--resume 失败(且 --continue 打开空对话)的问题
  • 修复了交互式会话中忽略自定义命令和技能上的 frontmatter model: 的问题
  • 修复了在从旧版本继续的对话中,Artifact 发布因“unexpected parameter note”错误而失败一次的问题
  • 修复了启动时忽略 managed forceRemoteSettingsRefresh 的问题,前提是 MDM 或托管设置文件中配置的策略助手已运行
  • 修复了工作树隔离在 git rev-parse 失败且报错信息非“不是 git 仓库”时,拒绝由 hook 创建的工作树的问题
  • 修复了云会话的 OpenTelemetry 指标和事件缺失 user.email、organization.id 和 user.account_uuid 属性的问题
  • 修复了 MCP 服务器在启动时列出工具过程中断开连接,却显示为已连接且无工具,而非报告错误的问题
  • 修复了文件编辑权限对话框有时截断变更行且无任何提示的问题
  • 修复了因临时 git 探测失败导致已知仓库身份丢失的问题
  • 修复了当 managed-settings 文件、drop-in、MDM plist 或 HKLM 值无法解析时,托管设置静默失效未执行的问题:Claude Code 现在会拒绝启动并指明来源
  • 修复了远程控制会话中 Stop 未能真正停止后台代理和工作流的问题:被终止的任务现在保持可见并可重新停止,直到其进程退出
  • 修复了在之前停止的运行仍在退出时恢复工作流运行,可能导致其代理重复运行的问题
  • 修复了 github.com 上的市场仓库 URL 若带有尾部斜杠或悬空的 ?/#,会导致生成不可用的 .git clone URL 的问题
  • 修复了阻塞性 Stop hooks 导致阻塞后的轮次丢失该轮次的模型推理内容,并在某些模型上错过提示缓存的问题
  • 修复了浏览器托管的 MCP 服务器页面消失后,远程 (claude.ai) 会话启动轮次需耗时 60 秒的问题
  • 修复了工作树隔离会话拒绝常见 Bash 循环、xargs 管道以及无法访问主签出目录的 launcher 包装命令的问题
  • 通过复用文本测量数据,改善了长响应场景下的终端调整大小和首次渲染性能
  • 改善了 /workflows 代理详情:JSON 结果以语法高亮和真实换行美化打印,长结果折叠在展开切换按钮后方
  • 改善了无头/SDK 会话启动:当 MCP 服务器完成连接时,首个轮次提前最多 50 毫秒开始
  • 改善了 /install-github-app 说明:指出其仅适用于 GitHub,并在 GitLab 仓库内运行时指向 GitLab CI/CD 文档
  • 改善了嵌套后台子代理结果的保存方式:将其保存在父级子代理的对话记录中,以便恢复的子代理保留这些结果,共享对话记录也能显示交付情况
  • 更改了 allowedMcpServers 的管辖范围,使其仅管理用户添加的服务器:原先会被白名单过滤掉的 literal managed-mcp.json 服务器现在会在升级时加载;如需禁用它,请使用 deniedMcpServers
  • [VSCode] 在会话列表侧边栏中添加了活动快速筛选器和状态筛选菜单(需要输入、进行中、已完成)
  • 修复了在会话暂停期间批准连接器工具权限提示后,远程和计划会话不执行任何操作的问题

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

另一事件,读法相近