---
title: "Claude Code v2.1.216 发布：修复长会话性能与多项稳定性问题"
source: "Claude Code：GitHub Releases（RSS）"
source_tier: "t1_5"
url: "https://github.com/anthropics/claude-code/releases/tag/v2.1.216"
permalink: "https://feed.astralor.com/items/itm_148899bb1469593a221b257c"
published: "2026-07-20T22:14:00.000Z"
score: 76
channel: "ai"
tags: ["Bash","Claude Code","OAuth","PowerShell","sandbox.filesystem","worktree"]
---

# Claude Code v2.1.216 发布：修复长会话性能与多项稳定性问题

## AI 点评

> 这是近期Claude Code最值得关注的一次稳定性更新，尤其对于长期使用Claude Code进行大规模代码重构或调试的用户。修复的二次增长卡顿问题会直接影响日常流畅度，而OAuth过期导致自动模式瘫痪则是一个易触发但隐蔽的bug。建议所有Claude Code用户尽快升级。

## 速览

Claude Code v2.1.216 修复了消息归一化成本随会话轮次二次增长导致的数秒级卡顿，提升了长期会话响应速度。同时修复了 OAuth 令牌过期后自动模式拒绝命令、工作树隔离子代理还原默认 agent、@提及在文件修改钩子后无效、背景会话撤销等多个关键问题。改进了 /fork 确认行、/context 窗口溢出警告、/spend-limit 调整提示以及 /code-review 空差异消息。此外还修复了 Windows 权限提示、PowerShell 工具参数验证、全屏模式对话框溢出、终端右到左文本渲染等众多细节问题。

## 关键点

- 修复消息归一化成本二次增长导致的长会话卡顿（秒级停顿）
- 修复 OAuth 令牌过期/轮换后自动模式拒绝命令的问题
- 修复工作树隔离子代理还原默认 agent 的 prompt 和工具限制
- 改进 /fork 确认行、/context 窗口溢出警告、/code-review 空差异消息

## 全文

What's changed Added sandbox.filesystem.disabled setting to skip filesystem isolation while keeping network egress control Fixed a slowdown in long sessions where message normalization cost grew quadratically with the number of turns, causing multi-second stalls and slow resumes Fixed auto mode denying commands with "HTTP 401" classifier errors after the OAuth token expired or rotated mid-session Fixed AskUserQuestion telling Claude to continue even when your answer asked it to wait or explain first — free-text answers now get neutral wording Fixed Claude Code on the web re-asking the same question and dropping your answer after the session sat idle for a few minutes Fixed @-mentions silently attaching nothing after file-modifying hooks, vim dot-repeat of c-operators and paste, statusline running twice on resume, and resume-picker hangs on failure Fixed resumed background agent sessions reverting to the default agent: the agent's prompt and tool restrictions are now restored Fixed worktree-isolated subagents redirecting git into the shared checkout via git -C, --git-dir, or GIT_DIR/GIT_WORK_TREE Fixed worktree sessions landing in another project's leftover worktree when the working directory did not match the selected project Fixed background sessions whose worktree has no git repository being undeletable Fixed claude daemon stop --any potentially terminating an unrelated process via a stale legacy daemon lockfile Fixed Esc-Esc at an idle prompt not opening the rewind picker in long-running sessions with background tasks Fixed Bash command permission checking for compound statements with redirects inside && lists or negations Fixed pressing Ctrl+X twice in the agent list failing to delete a session, and deleted sessions reappearing when their background worker had died Fixed background subagents getting cancelled when a high-priority message arrives during their startup window Fixed mouse and focus garbage in the terminal while a GUI editor from /memory, /plan, /keybindings, or Ctrl+G is open; /memory no longer waits for the editor to close Fixed Claude-in-Chrome 403-looping on reconnect when the session's OAuth token lacks a required scope Fixed workflow saves and scheduled-task writes following a symlink at .claude, which could redirect writes outside the project Fixed MCP re-authenticate revoking working credentials before the new sign-in succeeds, and the reconnect needs-auth message in background sessions pointing at an unusable command Fixed read-only commands on Windows accessing network paths without a permission prompt Fixed Bash command parsing of non-ASCII characters to match real shell word boundaries Fixed PowerShell tool permission validation of commands containing invisible Unicode characters Fixed dialogs in fullscreen mode stretching past the right-hand edge of their panel Fixed the /config settings list in fullscreen mode clipping its keyboard-hint footer Fixed the transcript-mode (Ctrl+O) footer hint wrapping on terminals narrower than 104 columns Fixed the Prometheus metrics endpoint (OTEL_METRICS_EXPORTER=prometheus) emitting invalid # UNIT lines Fixed skills and commands changed during a session not appearing in the slash menu until restart Fixed plugin skills with a name frontmatter field losing their plugin prefix in slash-command autocomplete Fixed telemetry misreporting permission denials: failed permission-prompt requests no longer count as user rejections, and user interrupts are now reported as user aborts instead of rejections Improved the /fork confirmation to one line with the new session's name, claude attach id, and a note when the copy shares your checkout Improved validation of git and gh command arguments in the PowerShell tool Improved the /ultrareview diff-too-large error to show configured limits, measured diff size, and largest contributing files Improved /code-review ultra empty-diff message to name the exact base ref and suggest passing an explicit base Improved the spend limit adjustment prompt to show the server's reason when a spend limit change is rejected /context now shows an explicit warning when the conversation exceeds the context window, and a failed /compact displays as an error /rewind no longer restores or deletes files through symlinks or hard links at tracked paths and reports how many paths it skipped Background sessions: /mcp and /install-github-app now park a "needs input" request in the agent view when no client is attached Updated the bundled dataviz skill: reordered the default chart palette and fixed guidance that suggested direct labels for four-series charts [VSCode] Fixed right-to-left text (Arabic, Hebrew, Persian) rendering in the wrong order when mixed with English or code Fixed cloud sessions dropping the in-flight message when the session's container restarts mid-turn — the interrupted turn now re-runs on resume instead of leaving the session unresponsive

---

引用前请核对原文;本文由星际流动整理:https://feed.astralor.com/items/itm_148899bb1469593a221b257c
