Claude Code v2.1.247
英文标题:Claude Code v2.1.247
Claude Code v2.1.247 新增 `SendFeedback` 工具,可在会话出现问题时生成反馈草稿,并支持通过 `feedbackDrafts` 设置关闭。版本还扩展了 `spinnerTipsOverride` 配置,并加入 `/claude-api cost-optimize`,帮助开发者分析现有项目的 Claude API 支出并逐项优化缓存、Token 使用、批处理、推理强度与模型选择。此次更新修复了历史搜索、子 Agent、后台会话、Bash 沙箱、插件市场、远程控制和云端会话等多个稳定性问题,同时增强了插件安全性、MCP 连接失败提示以及 1M 上下文窗口下的自动压缩策略。
打开原文相关 7.2 · 机会 2
1.3 KB
50.7 KB
中文
更新内容
- 新增
SendFeedback工具:当会话中出现问题时,Claude 可以起草一份反馈报告,供你通过/feedback审阅并发送(可通过feedbackDrafts设置关闭)。 - 为
spinnerTipsOverride新增{id, text, cooldownSessions, priority}条目、tipsFile和label,使组织能够将自定义提示与内置提示一同轮换展示。 - 在 Bash 权限提示中新增一条指向自动模式的提示,并提供“一键确认并切换至自动模式”的选项。
- 新增
/claude-api cost-optimize,用于分析现有项目的 Claude API 支出,并一次实施一项可量化的优化措施,包括缓存、Token 卫生、批处理、推理强度和模型选择。 - 更新
/claude-api技能,覆盖 Admin API 功能,包括组织成员、邀请、工作区、API 密钥、速率限制报告、工作负载身份联合和 CMEK。 - 修复在历史搜索、
/config、/mcp、/skills、后台任务和/model中快速连续按方向键与 Enter 时,操作会错误作用于导航目标上一行的问题。 - 修复子 Agent 在首次调用模型时遇到 404 后退出的问题:现在会使用会话的后备模型链,返回给父 Agent 的错误信息也包含错误类型、状态码、请求 ID 和模型。
- 修复 Hook 或后台 Agent 输出数 MB 错误信息时可能导致对话溢出,并使会话卡在“Prompt is too long”的问题。
- 修复在使用 kitty 协议终端的非拉丁键盘布局(例如西里尔字母布局)下,Ctrl 键盘快捷键无法触发的问题。
- 修复鼠标报告在转义前缀之后被拆分读取时,可能将
<35;150;7M等文本插入提示词的问题。 - 修复 Bash 沙箱的命令后清理操作会删除由 dotfile 管理的
~/.claude/settings.json符号链接的问题;该问题出现在链接被重新指向沙箱可写区域之外时,例如使用 nix/home-manager 或 stow 的场景。 - 修复
/terminal-setup会覆盖整个 Zedkeymap.json、而非合并其快捷键绑定的问题。 - 修复当会话注册表无法更新时,
/rename会静默确认的问题;现在会提示其他会话可能仍显示旧名称。 - 修复通过
--agent启动的会话中,/compact和“Summarize from here”会基于默认系统提示词、而非当前对话自身提示词进行摘要的问题。 - 修复后台会话的终端宿主进程退出后,
claude agents中持续显示“opening…”的问题;现在该行会在数秒内以失败状态显示原因,按 Enter 可重新启动。 - 修复当 Hook 或后台任务的输出文件无法写入时,内存可能无限增长的问题;文件现在会注明输出丢失的位置。
- 修复通过 SSH 使用
/install-github-app时的问题:复制快捷方式现在会说明登录 URL 是如何被复制的,而不再始终声称复制成功;当无法打开浏览器时,URL 会立即显示。 - 修复从前台继承的 shell 命令在后台会话中完成时,可能记录内部错误或显示误导性
[exited with code -1]行的问题。 - 修复无版本号的市场插件在第二个作用域安装时,其实时缓存目录会被删除并重新创建的问题;这可能干扰正在使用该插件的运行中会话。
- 修复通过
/remote-control启动的 Remote Control 会话不会向已连接客户端报告工作树差异的问题。 - 修复自托管 Runner 会话在 Claude Code 实际启动前就报告为
running的问题;这可能触发 Claude 桌面应用过早发出“Claude 正在等待你的输入”通知。 - 修复首次运行设置在托管设置配置 Claude apps gateway 登录、且 Anthropic 端点不可达时,会以“Unable to connect to Anthropic services”退出的问题。
- 修复云端会话(Web 版 Claude Code、桌面应用和移动应用)在发送消息后立即切换权限模式时,有时仍显示此前权限模式的问题。
- 修复云端会话在回合之间容器重启、且后台 Agent、shell 或监控器仍在运行时可能没有响应的问题;恢复后的会话现在会报告丢失的工作。
- 增强插件市场安全性:拒绝包含控制字符或不可见字符的名称,并确保
/plugin和claude plugin输出中的市场提供文本能够安全转义。 - 改进 Bedrock、Vertex 和 Foundry 会话(以及任何禁用遥测的会话):当配置的 MCP 服务器连接失败时,Claude 现在会收到通知,而不再断定其工具不存在。
- 将 Sonnet 5 默认自动压缩窗口调整为完整的 1M 上下文;因此,使用 1M 窗口的会话现在会在约 967K Token 时自动压缩,而非约 934K Token。
- 将跨会话对等消息默认折叠为单行预览:
Message from @<sender>: <first line>;按 Ctrl+O 可展开完整正文。 - 调整渲染 Markdown 中的终端超链接:目标链接若指向网络路径或自动挂载路径、包含控制字符,或以不可见字符开头,现在将以纯文本形式渲染。
- 调整提示词页脚中的 PR 徽章:若上次 GitHub 检查距今不足一分钟,终端重新获得焦点时将跳过重新检查。
- 调整分析功能:当托管设置强制 gateway 登录,或配置了自定义 OAuth 部署时,分析功能从启动时起即保持关闭,而不再仅在登录后关闭。
- 调整 Claude apps gateway 登录请求的身份标识:请求现在会标识为 Claude Code,包括
surface=claude_code设备授权参数和claude-code/<version>User-Agent。 - 调整组织登录强制策略:当无法读取管理员的托管设置时,程序会在启动时退出,即使存在主机提供的设置或按用户配置的 Windows 注册表设置。
English / 原文
Compare
Sorry, something went wrong.
No results found
What's changed
- Added the
SendFeedbacktool: when something goes wrong in a session, Claude can draft a feedback report for you to review and send from/feedback(turn off with thefeedbackDraftssetting) - Added
{id, text, cooldownSessions, priority}entries,tipsFile, andlabeltospinnerTipsOverride, so organizations can rotate their own tips alongside the built-in ones - Added a tip on Bash permission prompts pointing to auto mode, with a one-keystroke "Yes, and switch to auto mode" option
- Added
/claude-api cost-optimizeto profile an existing project's Claude API spend and work through cost levers (caching, token hygiene, batch, effort, model choice) one measured change at a time - Updated the
/claude-apiskill with Admin API coverage (organization members, invites, workspaces, API keys, rate limit reports, workload identity federation, CMEK) - Fixed fast arrow-key + Enter sequences acting on the row above the one you navigated to in history search,
/config,/mcp,/skills, background tasks, and/model - Fixed sub-agents dying on a first-call model 404: they now use the session's fallback model chain, and the error returned to the parent includes the error type, status, request id, and model
- Fixed a hook or background agent that printed megabytes of error output being able to overflow the conversation and wedge the session on "Prompt is too long"
- Fixed Ctrl keyboard shortcuts not firing under non-Latin (e.g. Cyrillic) keyboard layouts in kitty-protocol terminals
- Fixed text like
<35;150;7Mbeing inserted into the prompt when a mouse report arrived split across reads right after the escape prefix - Fixed the Bash sandbox's after-command cleanup deleting a dotfile-managed
~/.claude/settings.jsonsymlink (nix/home-manager, stow) when it is repointed outside the sandbox's writable area - Fixed
/terminal-setupoverwriting your entire Zedkeymap.jsoninstead of merging in its keybinding - Fixed
/renamesilently confirming when the session registry could not be updated; it now says other sessions may still show the old name - Fixed
/compactand "Summarize from here" in sessions started with--agentsummarizing under the default system prompt instead of the conversation's own - Fixed a background session showing "opening…" forever in
claude agentsafter its terminal host process died; the row now fails within seconds with the reason, and Enter restarts it - Fixed unbounded memory growth when a hook's or background task's output file could not be written; the file now notes where output was lost
- Fixed
/install-github-appover SSH: the copy shortcut now says how the sign-in URL was copied instead of always claiming success, and the URL appears immediately when no browser can open - Fixed shell commands carried over from the foreground logging an internal error or showing a misleading
[exited with code -1]line when they finish in background sessions - Fixed a version-less marketplace plugin's live cache directory being deleted and recreated on a second-scope install, which could disrupt a running session using it
- Fixed Remote Control sessions started with
/remote-controlnot reporting the working-tree diff to connected clients - Fixed self-hosted runner sessions reporting
runningbefore Claude Code had started, which could trigger a premature "Claude is waiting for your input" notification from the Claude desktop app - Fixed first-run setup exiting with "Unable to connect to Anthropic services" when managed settings configure Claude apps gateway sign-in and Anthropic endpoints are unreachable
- Fixed cloud sessions (Claude Code on the web, desktop and mobile apps) sometimes showing the previous permission mode when you switch modes right after sending a message
- Fixed cloud sessions going silent when the session's container restarts between turns while a background agent, shell, or monitor is still running — the resumed session now reports the lost work
- Improved plugin marketplace hardening: names containing control or invisible characters are rejected, and marketplace-supplied text in
/pluginandclaude pluginoutput is escape-safe - Improved Bedrock, Vertex, and Foundry sessions (and any with telemetry disabled): Claude is now told when a configured MCP server failed to connect, instead of concluding its tools don't exist
- Changed Sonnet 5's default auto-compact window to its full 1M context, so sessions on the 1M window now auto-compact at about 967K tokens instead of about 934K
- Changed cross-session peer messages to collapse by default to a one-line
Message from @<sender>: <first line>preview; Ctrl+O expands the full body - Changed terminal hyperlinks in rendered markdown: link targets that point at a network or automounter path, contain a control character, or lead with an invisible character now render as plain text
- Changed the prompt-footer PR badge to skip its GitHub re-check on terminal refocus when the last check is under a minute old
- Changed analytics to stay off from startup, not only after login, when managed settings force gateway login or a custom OAuth deployment is configured
- Changed Claude apps gateway sign-in requests to identify Claude Code (a
surface=claude_codedevice-authorization parameter and aclaude-code/<version>User-Agent) - Changed organization sign-in enforcement to exit at start when the administrator's managed settings cannot be read, even if host-supplied or per-user Windows registry settings exist
You can’t perform that action at this time.