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

Claude Code v2.1.234:新增环境变量与GitLab徽章,加固NTLM安全

v2.1.234

原文
推荐理由

Claude Code 重度用户注意:本次更新包含针对 NTLM 凭据泄漏向量的安全加固,涉及远程文件读取、会话恢复等核心路径,建议尽快升级。同时新增的 GitLab MR 徽章和自动续会话功能也值得体验。

What's changed

变更内容

  • Added the optional CLAUDE_CODE_PROJECT_DIR_NAME environment variable: hosts that give each session its own config directory can choose a short name for the per-project transcript directory
  • Added the selection:clear keybinding action, so a key can be bound to clear an in-app text selection; also works in the agents view
  • Added a GitLab merge request badge to the footer and statusline: repos with a GitLab remote and an authenticated glab CLI show MR !N with draft/pending/green states
  • Claude Code now continues your session automatically when a claude.ai usage limit resets; turn it off in /config ("Continue automatically at usage limit")
  • Claude is now told to use your account email only to identify you, and not to send it to unrelated services unless you ask
  • Security: remote file reads, session restore, CLAUDE.md includes, workflow scripts and file uploads now reject Windows NT-namespace (\??\) paths, hardening the remaining pre-approval file accesses against the NTLM credential-leak vector
  • Fixed auto mode in very long sessions repeatedly re-checking and denying sandboxed commands' network access after the conversation had been compacted
  • Fixed session-scoped permission answers (including denies) being dropped when answering background subagent tool permission prompts
  • Fixed a crash when an API response on the non-streaming fallback path (typically via third-party gateways) contained a thinking block missing its thinking field or a text block missing its text field
  • Fixed markdown rendering becoming extremely slow for some messages containing unusual Unicode sequences
  • Fixed SendMessage rejecting a recipient copied from ListAgents when the session name is at the 200-character cap or emoji-heavy
  • Fixed repository detection mis-reading the host of git remotes with unusual userinfo, producing links and repo-specific behavior for the wrong host
  • Fixed MCP diagnostics printing resolved secrets: scope-conflict warnings now show the configured ${VAR} form, and connection-failure details show only the server origin
  • Fixed strictKnownMarketplaces allowlists accepting SCP-style git marketplace sources whose host differs from the one git would actually connect to
  • Fixed modal text such as the /login OAuth URL losing characters when copied in fullscreen
  • Fixed a --- horizontal rule in rendered markdown running into the line after it
  • Fixed consecutive shell commands splitting into multiple "Ran 1 shell command" rows when todo/task updates were interleaved between them
  • Fixed dialogs like /permissions opened while a ! shell command was running being dismissed when the command finished
  • Fixed a queued ! shell command being sent to the model as plain text after pressing up-arrow to edit the queued input
  • Fixed queued messages reappearing in the prompt history while still queued, Esc while selecting a queued message no longer interrupts the turn, and ! mode no longer sticks after a mid-turn submit
  • Fixed accepting the "Try the new fullscreen renderer?" prompt restarting the session without its permission mode (e.g. --dangerously-skip-permissions), tool allow/deny rules, model or effort flags
  • Fixed /tui dropping launch --allowed-tools/--disallowed-tools rules when it restarts; it now declines to switch, with the reason, when the session has restrictions a restart can't carry over
  • Fixed trust prompts omitting the repository-wide scope warning when the directory was first seen before the repository existed there
  • Fixed a case where an IDE diff tab closing during a permission re-prompt could answer the new prompt with the previous input
  • Fixed: files sent to the user during Remote Control sessions hosted by Claude Code Desktop or VS Code now upload, so they open on phone and web instead of showing an empty card
  • Fixed: after /login while CLAUDE_CODE_OAUTH_TOKEN is set, the stale-token reminder no longer leaks into Claude's automatically resumed turn — it now appears only to you
  • Fixed: permission previews now relay only to channel servers admitted by the inbound trust gate, and a server's explicit permission-capability opt-out is honored
  • Fixed: credential masking on relayed permission previews can no longer hide commands, paths, or destinations from the approver; oversized private-key blocks now redact under full-strength redaction
  • Fixed: provider API tokens that mask on permission previews now mask even when directly followed by shell delimiters
  • Fixed Claude Desktop inter-session messages being silently dropped by the recipient session when cross-session messaging read as disabled, which left the sender's query "thinking" for many minutes
  • Remote Control: signing this computer in to a different claude.ai account or organization now stops the running session within seconds and says why, instead of a misleading HTTP 404 hours later
  • Remote Control sessions started from Claude Code Desktop or VS Code now keep phones and claude.ai/code updated on the session's permission mode (and claude.ai/code on the model) as they change
  • Remote Control: effort picks made on a phone or on claude.ai/code now apply to terminal- and Desktop/VS Code-hosted sessions, and the session publishes its effort level to connected clients
  • SendMessage and ListAgents now say when your account's session list was too long to check completely, instead of treating unseen sessions as absent
  • Expired Anthropic profile credential now points you at /login when a claude.ai login would take precedence
  • Improved the transcript: your own prompts now render markdown (highlighted code blocks, inline code, lists) the same way replies do
  • Improved the "API returned an empty or malformed response" error to say what came back (content type, body kind, size, request ID) and why the original streaming request failed
  • Improved auto-generated session titles to read as short, specific names (e.g. "Login button bug") rather than sentences restating your request (e.g. "Fix the login button on mobile")
  • Reduced the context cost of loading the built-in claude-api skill from ~200k+ tokens to ~25k by loading reference docs on demand
  • /permissions can now be opened while Claude is working — rule changes apply to the rest of the current turn
  • /add-dir <path> can now be used while Claude is working; /add-dir, /autocompact, /theme, /help, /config and /advisor dialogs open mid-turn in the fullscreen TUI
  • /goal now clears itself with a notice when a turn dies on an unrecoverable error (e.g. revoked auth, an exhausted credit balance, or a context overflow) instead of staying armed
  • /goal: when background tasks keep a goal waiting for 30+ minutes, Claude now checks in on them instead of waiting indefinitely (set CLAUDE_CODE_GOAL_CHECKIN_MINUTES=0 to opt out)
  • claude setup-token now rejects unexpected extra arguments instead of silently ignoring them
  • Changed Esc in fullscreen mode to no longer clear a mouse text selection: it interrupts or dismisses as usual and the selection stays highlighted
  • Removed the redundant "Allowed by auto mode classifier" line that auto mode showed under every Agent tool call
  • Removed the "Default teammate model" setting from /config; agent-team teammates now use the leader's model unless the spawn names one
  • Dimmed the elapsed-time counter on the running tool header so it no longer competes with the bold counts
  • Background task notifications delivered between turns are now sent to the model inside <system-reminder> tags, matching mid-turn delivery
  • Mantle: skip the admin-pin availability probe at startup when a main-loop model is already picked
  • Windows: startup no longer stalls on repeated rename retries when ~/.claude.json is read-only
  • 新增可选的 CLAUDE_CODE_PROJECT_DIR_NAME 环境变量:为每个会话提供独立配置目录的主机可为每个项目的转录目录选择简短名称
  • 新增 selection:clear 键绑定操作,可将某个键绑定为清除应用内文本选择;在代理视图中同样适用
  • 在页脚和状态栏新增 GitLab 合并请求徽章:具有 GitLab 远程仓库且已认证 glab CLI 的仓库会显示 MR !N,并带有草稿/待处理/绿色状态
  • 当 claude.ai 使用限制重置时,Claude Code 现在会自动继续您的会话;可在 /config 中关闭(“使用限制时自动继续”)
  • 现在 Claude 被告知仅使用您的账户邮箱来识别您,除非您要求,否则不会将其发送给无关服务
  • 安全性:远程文件读取、会话恢复、CLAUDE.md 包含、工作流脚本和文件上传现在拒绝 Windows NT 命名空间(\??\)路径,强化了剩余的预批准文件访问,以防范 NTLM 凭据泄露向量
  • 修复了超长会话中自动模式在对话压缩后反复重新检查并拒绝沙盒命令网络访问的问题
  • 修复了在回答后台子代理工具权限提示时会话级权限答案(包括拒绝)被丢弃的问题
  • 修复了非流式回退路径(通常通过第三方网关)上的 API 响应包含缺少 thinking 字段的思考块或缺少 text 字段的文本块时导致的崩溃
  • 修复了某些包含异常 Unicode 序列的消息导致 Markdown 渲染变得极其缓慢的问题
  • 修复了当会话名称达到 200 字符上限或包含大量表情符号时,SendMessage 拒绝接受从 ListAgents 复制的收件人的问题
  • 修复了仓库检测误读具有异常用户信息的 git 远程主机,导致链接和仓库特定行为指向错误主机的问题
  • 修复了 MCP 诊断打印已解析的机密信息:作用域冲突警告现在显示配置的 ${VAR} 形式,连接失败详情仅显示服务器来源
  • 修复了 strictKnownMarketplaces 允许列表接受 SCP 风格的 git 市场来源,而其主机与 git 实际连接的主机不同的情况
  • 修复了全屏模式下复制 /login OAuth URL 等模态文本时丢失字符的问题
  • 修复了渲染的 Markdown 中 --- 水平线与后续行重叠的问题
  • 修复了当待办/任务更新穿插在连续 shell 命令之间时,这些命令被拆分为多个“运行了 1 条 shell 命令”行的问题
  • 修复了在运行 ! shell 命令时打开的固定对话框(如 /permissions)在命令完成后被关闭的问题
  • 修复了按上箭头编辑排队输入后,排队的 ! shell 命令作为纯文本发送给模型的问题
  • 修复了排队消息在仍处于排队状态时重新出现在提示历史中、选择排队消息时按 Esc 不再中断回合,以及回合中途提交后 ! 模式不再卡住的问题
  • 修复了接受“尝试新的全屏渲染器?”提示后,会话重启时丢失其权限模式(如 --dangerously-skip-permissions)、工具允许/拒绝规则、模型或努力标志的问题
  • 修复了 /tui 重启时丢弃启动时的 --allowed-tools/--disallowed-tools 规则的问题;现在当会话有重启无法继承的限制时,它会拒绝切换并说明原因
  • 修复了当目录在仓库存在之前首次被看到时,信任提示省略仓库范围警告的问题
  • 修复了权限重新提示期间 IDE 差异标签页关闭时,可能用之前的输入回答新提示的问题
  • 修复了:在 Claude Code Desktop 或 VS Code 托管的远程控制会话期间发送给用户的文件现在会上传,因此它们会在手机和网页上打开,而不是显示空卡片
  • 修复了:在设置 CLAUDE_CODE_OAUTH_TOKEN 后执行 /login 时,过时令牌提醒不再泄漏到 Claude 自动恢复的回合中——现在只显示给你
  • 修复了:权限预览现在只转发给入站信任门允许的频道服务器,并且服务器的显式权限能力选择退出会被尊重
  • 修复了:中继的权限预览上的凭据掩码不再能对审批者隐藏命令、路径或目标;过大的私钥块现在在全力掩码下会进行编辑
  • 修复了:权限预览上掩码的提供商 API 令牌现在即使直接后跟 shell 分隔符也会被掩码
  • 修复了 Claude Desktop 跨会话消息在接收会话中因跨会话消息传递被视为禁用而被静默丢弃的问题,这导致发送者的查询“思考”了很长时间
  • 远程控制:将此计算机登录到不同的 claude.ai 账户或组织现在会在几秒钟内停止正在运行的会话并说明原因,而不是几小时后出现误导性的 HTTP 404
  • 从 Claude Code Desktop 或 VS Code 启动的远程控制会话现在会在权限模式(以及 claude.ai/code 上的模型)变化时,保持手机和 claude.ai/code 的更新
  • 远程控制:在手机或 claude.ai/code 上做出的 effort 选择现在适用于终端和桌面/VS Code 托管的会话,并且会话会将其 effort 级别发布给连接的客户端
  • SendMessage 和 ListAgents 现在会说明您的账户会话列表过长而无法完全检查,而不是将未查看的会话视为不存在
  • 过期的 Anthropic 配置文件凭据现在会在 claude.ai 登录优先时引导您前往 /login
  • 改进了转录:您自己的提示现在以与回复相同的方式渲染 Markdown(高亮代码块、行内代码、列表)
  • 改进了“API 返回空或格式错误的响应”错误,现在会说明返回的内容(内容类型、正文类型、大小、请求 ID)以及原始流式请求失败的原因
  • 改进了自动生成的会话标题,使其读起来像简短、具体的名称(例如“登录按钮 bug”),而不是复述您请求的句子(例如“修复移动端登录按钮”)
  • 通过按需加载参考文档,将加载内置 claude-api 技能的上下文成本从约 200k+ 个 token 降低到约 25k
  • 现在可以在 Claude 工作时打开 /permissions——规则更改适用于当前回合的剩余部分
  • 现在可以在 Claude 工作时使用 /add-dir <path>;/add-dir、/autocompact、/theme、/help、/config 和 /advisor 对话框会在全屏 TUI 中于回合中途打开
  • /goal 现在会在回合因不可恢复错误(例如凭据被撤销、信用余额耗尽或上下文溢出)而终止时,以通知方式自行清除,而不是保持启用状态
  • /goal:当后台任务让目标等待 30 分钟以上时,Claude 现在会检查这些任务,而不是无限期等待(设置 CLAUDE_CODE_GOAL_CHECKIN_MINUTES=0 可选择退出)
  • claude setup-token 现在会拒绝意外的额外参数,而不是静默忽略它们
  • 更改了全屏模式下 Esc 键的行为,不再清除鼠标文本选择:它会像往常一样中断或关闭,但选择仍保持高亮
  • 移除了自动模式在每个 Agent 工具调用下显示的冗余“由自动模式分类器允许”行
  • 从 /config 中移除了“默认队友模型”设置;agent-team 队友现在使用领导者的模型,除非生成时指定了模型
  • 调暗了运行中工具标题上的耗时计数器,使其不再与粗体计数竞争
  • 回合之间传递的后台任务通知现在通过 <system-reminder> 标签发送给模型,与回合中途的传递方式一致
  • Mantle:当主循环模型已选定时,启动时跳过管理员 PIN 可用性探测
  • Windows:当 ~/.claude.json 为只读时,启动不再因反复重命名重试而停滞

更进一步:量化金融体系

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

进入量化体系 →

相似阅读

另一事件,读法相近