# Claude Code v2.1.216 发布：修复长会话卡顿与多项 Agent 行为问题

- 来源：Claude Code：GitHub Releases（RSS）
- 作者：ashwin-ant
- 发布时间：2026-07-21 06:14
- AIHOT 分数：50
- AIHOT 链接：https://aihot.virxact.com/items/cmrttgvpt2df6bihzuw6rji95
- 原文链接：https://github.com/anthropics/claude-code/releases/tag/v2.1.216

## AI 摘要

Claude Code v2.1.216 修复了长会话中消息归一化成本随轮次二次增长导致的数秒停顿问题，并修正了 OAuth token 过期后自动模式误判 HTTP 401、后台子智能体重启后恢复默认配置、以及工作树隔离子智能体重定向 git 目录等多项缺陷。新增 `sandbox.filesystem.disabled` 设置，可在保留网络出口控制的同时跳过文件系统隔离。

## 正文

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
