# Claude Code v2.1.216 Sweeps Away Long-Session Slowdowns and Security Loopholes!

Hey everyone, it's me! I've been checking out the latest Claude Code release, so let's dive in!

## What was announced?

Claude Code Release published the latest version of the Claude Code CLI, v2.1.216. The GitHub Releases page lists nearly 40 changes — one new setting, plus a dense batch of performance, security, and UI fixes.

## The story so far

Until now, Claude Code had a handful of quiet-but-real issues.

- In long sessions, message normalization cost grew quadratically with the number of turns, causing multi-second stalls and slow resumes
- Worktree-isolated subagents could redirect Git into the shared checkout via `git -C`, `--git-dir`, or `GIT_DIR`/`GIT_WORK_TREE`, defeating the isolation
- A symlink planted at `.claude` could redirect workflow saves and scheduled-task writes outside the project
- Compound Bash commands with redirects tucked inside `&&` lists or negations could slip past permission checks
- The PowerShell tool's permission validation could be bypassed with invisible Unicode characters, and read-only commands on Windows could access network paths without a permission prompt
- Right after an OAuth token expired or rotated mid-session, auto mode misclassified "HTTP 401" errors as command denials

In short, there were small cracks in both the performance foundation and the security boundary.

## What changes

This release fixes all of that. The quadratic growth in normalization cost that slowed down long sessions is gone, so stalls and resumes should be smoother. The worktree-isolation escape, the `.claude` symlink write escape, and the Bash/PowerShell permission-check bypasses are all closed too.

On the feature side, there's a new `sandbox.filesystem.disabled` setting — it lets you turn off filesystem isolation alone while keeping network egress control in place.

## Dive Deep

A bunch of smaller-but-useful fixes landed too.

**Background sessions & worktrees**
- Fixed resumed background agent sessions reverting to the default agent — the agent's prompt and tool restrictions are now restored
- Fixed worktree sessions landing in another project's leftover worktree when the working directory didn't match the selected project
- Fixed background sessions whose worktree has no git repository being undeletable
- Fixed background subagents getting cancelled when a high-priority message arrives during their startup window

**Usability & UI**
- Fixed `AskUserQuestion` telling Claude to continue even when a free-text answer asked it to wait or explain first
- Fixed Claude Code on the web re-asking the same question and dropping the answer after a 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 dialogs in fullscreen mode stretching past their panel's right edge, the `/config` settings list clipping its footer hint, and the transcript-mode (Ctrl+O) footer wrapping on terminals narrower than 104 columns

**Everything else**
- Fixed `claude daemon stop --any` potentially terminating an unrelated process via a stale legacy daemon lockfile
- 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
- `/rewind` no longer restores or deletes files through symlinks or hard links, and reports how many paths it skipped

## Wrap-up

- Fixed the quadratic message-normalization cost bug that slowed down long sessions
- Closed several loopholes around worktree isolation, symlinks, and Bash/PowerShell permission checks
- Added `sandbox.filesystem.disabled` to disable filesystem isolation alone while keeping network controls
- Plus a pile of smaller background-session, worktree, and UI fixes

If you lean on Claude Code for long sessions, worktrees, or background agents, this release is worth grabbing for both the performance and security fixes!
