Claude Code v2.1.216: granular sandbox filesystem and quadratic stall fix
Claude Code v2.1.216 is a maintenance release with two fixes that matter for anyone using the agent in the terminal every day. First: a sandbox.filesystem.disabled setting that lets you skip filesystem isolation while keeping control over outbound network connections. Second, and more pressing: a bug where the cost of normalizing messages grew quadratically with the number of turns, causing multi-second stalls and slow recovery in long sessions.
Why this affects you. If you run Claude Code in sessions lasting more than half an hour, the stall was real. The agent would freeze for entire seconds when the conversation stretched on, and the problem got worse with each turn. The fix means long sessions stay responsive.
The sandbox.filesystem.disabled setting is a tradeoff weapon: remove filesystem isolation when it slows things down too much, but keep the network filter. After last month’s incidents, where removing the sandbox for speed led to accidental file deletions, Anthropic’s direction is clear: give granular control instead of an on/off switch. That way whoever configures the agent can decide what level of risk they accept.
The release also closes about a dozen smaller bugs: expired OAuth tokens blocking commands in auto mode, background sessions losing the subagent prompt on resume, isolated worktrees redirecting git to the shared checkout.
After the quick patch series from v2.1.215 and earlier, this is maintenance that keeps the daily work going.
In detail
The quadratic normalization bug is the fix with the most weight for Claude Code users. The problem sat in how the agent prepares messages before sending them to the model: every time a new turn got added to the conversation, the system recalculated normalization for all previous messages, not just the latest one. Result: by turn 50, the prep cost was 50 times that of the first turn. By turn 100, a hundred times. Quadratic growth (the same class of problem that slows software when data doubles and time quadruples).
For real-world Claude Code users, this meant something concrete: after twenty or thirty minutes of work, the agent would stop for entire seconds before resuming. It could look like a network issue or model latency, but it was all local, in the code that builds the context.
The fix, according to the release notes, makes normalization calculate just once per message and then get reused. It’s the kind of fix that doesn’t change features but changes experience: long sessions, the ones where the agent becomes truly useful, stop degrading.
The sandbox.filesystem.disabled setting addresses a different need. Claude Code, in sandbox mode, isolates the agent from the operating system’s filesystem: the agent sees only project files and can’t write outside them. This protects against errors and unexpected behavior, but it costs flexibility: some legitimate workflows need access to files outside the project, and isolation blocks them.
The new setting lets you turn off filesystem isolation while keeping network connection control. It’s a tradeoff: choose where you trust less (the agent touching files or the agent calling external addresses). After the Codex incident that deleted the home directory when the sandbox got removed for speed, Anthropic’s direction is clear: give granular options instead of a single switch, so whoever configures the agent can pick the risk level they accept.
The rest of the release is a list of fixes for background session stability: subagents losing their prompt on resume, isolated worktrees redirecting git to the shared checkout, expired OAuth tokens blocking commands. Small fixes individually, but together they tell the same story: Claude Code is in the phase where the remaining bugs aren’t about features but edge cases (the ones you only discover using the tool eight hours a day).
What’s left to verify: the real-world impact of the normalization fix depends on session length. Anyone working in short bursts might never have noticed the problem. Anyone using hour-long sessions should see the difference right after the update.