Back to Research

claude-code 2.1.216 Loosens Sandboxes

claude-code 2.1.216 adds a filesystem sandbox escape hatch and fixes stalls, resumes, web answers, and worktree isolation.

Landscape, The Palace of the Clouds, landscape painting by Unknown (1644).
Rogier MullerJuly 22, 202610 min read

claude-code v2.1.216 is an official release of Claude Code, Anthropic's coding agent that runs in your terminal, IDE, and GitHub workflows. It deals with a very practical problem: long agent sessions, review loops, worktrees, and web sessions can get weird when state, permissions, or authentication drift. The takeaway is simple: this release adds one important sandbox control and fixes several bugs that make Claude Code review work less surprising. Claude Code is a coding agent that reads your project, runs tools, edits files, and helps with git tasks through natural language.

Read the sandbox change before you flip it

The headline change is sandbox.filesystem.disabled, a setting that skips filesystem isolation while keeping network egress control. That is a narrow but important split. It says, in effect, “let this session touch the local filesystem normally, but do not remove the network boundary.”

Filesystem isolation is the boundary that limits what a Claude Code session can read or write on disk. Network egress control is the separate boundary that limits outbound network access. v2.1.216 matters because it treats those as two different concerns instead of one bundled safety posture.

A real example: imagine a repo where tests need to read files from a sibling checkout, a generated SDK folder, or a local package cache. Filesystem isolation can make that kind of workspace feel broken even when the agent is doing the right thing. This setting gives you a pressure valve without also opening outbound network access.

The trap is using it as a general convenience switch. If the session can write across your local filesystem, a bad tool call has a bigger blast radius. Keep it for small, understood repos first, and pair it with a clear MCP permission note or hook boundary when external systems are involved.

Notice how many fixes are about time

The most interesting fixes in v2.1.216 are not flashy. They are about time passing.

The release fixes a slowdown in long sessions where message normalization cost grew quadratically with the number of turns. In plain English: the longer the conversation got, the more expensive it became to keep processing it. That showed up as multi-second stalls and slow resumes.

That kind of bug is easy to dismiss until you use Claude Code as a reviewer. A Claude Code PR review often has a long shape: inspect diff, inspect tests, ask a question, run one command, revise, re-check. If every turn makes the next turn slower, the review stops feeling like a tool and starts feeling like a queue.

There is also an auto-mode fix for commands denied with HTTP 401 classifier errors after an OAuth token expired or rotated mid-session. That one is mundane in the best possible way. Auth tokens rotate, laptops sleep, browser sessions go idle, and agent sessions should not turn that into mysterious command denial.

The trap is judging release quality only by new features. For an agent that stays open while you work, resume behavior and auth recovery are product features. They decide whether the session survives the ordinary mess of a development day.

Treat the question fixes as review fixes

v2.1.216 also fixes two question-answer edges that matter during review.

First, AskUserQuestion no longer tells Claude to continue when your free-text answer asked it to wait or explain first. Free-text answers now get neutral wording. That sounds small, but it fixes a real mismatch: the human says “hold on, explain why,” and the system accidentally nudges the agent forward anyway.

Second, Claude Code on the web no longer re-asks the same question and drops your answer after the session sits idle for a few minutes. That is exactly the kind of bug that makes a reviewer distrust the transcript. If you gave an answer, the session should remember it.

This is where the previous release is a useful neighbor. In Claude Code 2.1.215 Makes Reviews Explicit, the story was about making review evidence clearer. v2.1.216 is less about evidence format and more about keeping the conversation state intact long enough for that evidence to matter.

The trap is assuming “web idle” bugs only affect casual use. They affect handoffs too. A review session that drops an answer after a coffee break can produce a confident conclusion from incomplete context.

Check background agents and worktrees twice

The release fixes resumed background agent sessions reverting to the default agent. The agent's prompt and tool restrictions are now restored. That matters because a background session is not just a transcript; it is a role plus a permission shape.

A security-focused reviewer and a refactor agent should not wake up as the same generic helper. If the prompt and restrictions are part of the job, losing them changes the job. This is especially relevant for a claude code security review, where the agent’s allowed tools and framing are part of the review boundary.

There are also worktree fixes. v2.1.216 fixes worktree-isolated subagents redirecting git into the shared checkout through git -C, --git-dir, or GIT_DIR / GIT_WORK_TREE. It also fixes worktree sessions landing in another project's leftover worktree when the worktree path was reused.

The clever bit is that the release names the specific escape routes. Git has many ways to point somewhere else. A worktree boundary is only believable if those alternate paths do not quietly tunnel back into the shared checkout.

The trap is trusting “isolated worktree” as a label without checking git state. Before you rely on a subagent’s edits, run a normal git status, inspect the worktree path, and confirm the branch you think it touched is the branch it actually touched.

Try it safely on one repo

Use v2.1.216 on a small repo where you can throw away the branch. The goal is not to prove everything. It is to test the exact surfaces this release changed: filesystem sandboxing, long sessions, questions, auth recovery, background agents, and worktrees.

A good test repo is boring: one web app, one test command, one lint command, and a short PR-sized change. Ask Claude Code to review the diff, run the tests, explain one failure, and pause for your answer before editing. That gives you a realistic code review loop without dragging production complexity into the first pass.

Keep your usual repository memory light. A concise CLAUDE.md note can help, but it should not hide the release test. One useful line is enough: “During review, ask before editing files outside the current package.” More conventions live well in the related training topic, but this experiment should stay focused.

For a practical Claude Code review smoke test, watch for three things: does the session stay responsive after many turns, does it preserve your answer after idle time, and does the agent stay inside the intended worktree and role. If those pass, the release is doing the quiet work it promised.

Copy this v2.1.216 upgrade note

Use this as a small “what changed and what to test” receipt. Paste it into the PR or issue where you try the version.

Area What changed in v2.1.216 What to test
Filesystem sandbox Added sandbox.filesystem.disabled to skip filesystem isolation while keeping network egress control Use only in a disposable branch; confirm which directories the session can edit
Long sessions Fixed quadratic message normalization cost that caused stalls and slow resumes Run a 20–30 turn review session and check whether resume stays responsive
Auth in auto mode Fixed HTTP 401 classifier denials after OAuth token expiry or rotation Let a session sit, refresh auth if needed, then run one low-risk command
User questions Fixed answers being treated as “continue” when you asked Claude to wait or explain Answer “wait, explain first” and confirm no edit happens before the explanation
Claude Code on the web Fixed repeated questions and dropped answers after idle time Leave the session idle for a few minutes, answer once, then verify the answer sticks
Background agents Restored resumed agent prompt and tool restrictions Resume a specialized agent and confirm it did not become the default agent
Worktrees Fixed git redirects and leftover worktree reuse Check git status, branch name, and worktree path before accepting edits

This is not a substitute for human review. It is a way to make the release’s changed behavior visible before you depend on it during a real claude code code review.

One methodology lens

One useful way to read this through our methodology is the Design step: delegate option mapping and pattern exploration, review the interfaces and tradeoffs, and keep ownership of architecture and contracts. If that split is still fuzzy, the workflow usually is too.

Practical starter checklist

- [ ] Name the Claude Code artifact first: a hook boundary, an MCP permission note, a slash-command workflow, a Claude skill outline, a review checklist, or a concise CLAUDE.md note when repository memory is the topic.
- [ ] Write the review checklist before generation starts: scope, owner, tests, rollback.
- [ ] Keep the first step small enough that a reviewer can inspect the receipt without replaying the whole chat.

Common questions

  • What should teams know about claude code review?

    Start by writing down one visible team rule for Claude Code, not a loose preference. That is the practical core of claude code code review. That usually means a short repository convention, a review checklist, and one owner who can reject agent output when the evidence is missing.

  • Which Claude Code artifact should teams standardize first?

    Standardize the smallest artifact that reviewers already touch: a hook checklist, MCP permission rule, slash-command workflow, skill outline, or concise CLAUDE.md note. The point is not documentation volume; it is a shared place where scope, allowed tools, expected tests, and rollback notes are visible before generated code reaches review.

  • How do teams know the convention is working?

    The convention is working when reviewers can approve or reject agent output from the artifact and evidence alone. Track whether pull requests name the rule used, include the promised checks, and avoid replaying long sessions just to understand what changed.

Best ways to use this research

  • Best for: Claude Code teams deciding which hook, skill, MCP boundary, slash-command workflow, review habit, or repository-memory convention to standardize next around “claude-code 2.1.216 Loosens Sandboxes.”
  • Best first artifact: turn the named fix into a hook checklist, skill note, MCP permission note, review receipt, or concise CLAUDE.md convention when repository memory is the real topic before the next automated run.
  • Best comparison angle: compare the workflow against the current Claude Code handoff, hook behavior, and MCP scope; keep the path that leaves the shortest auditable trail.

Further reading

What to do next

Take this into the related training topic and test whether a new reviewer can defend the merge without replaying the chat.

Related training topics

Related research

Ready to start?

Transform how your team builds software.

Book a 15-minute sync