A sandbox is only useful if it actually keeps the agent inside the fence. Claude Code 2.1.216 tightens several gaps that could let a background task, subagent, or resumed session wander outside its assigned directory. This release introduces a new configuration switch, but the more important work is under the hood: smarter handling of Git worktrees, symlinks, and agent restarts. If you run Claude Code locally or in CI, these changes deserve more than a quick skim of the changelog.
The Filesystem Toggle You Should Not Touch Lightly
Version 2.1.216 adds sandbox.filesystem.disabled. When this is set, Claude Code skips its own filesystem isolation while still enforcing the network sandbox. At first glance this sounds like a way to stop permission errors or speed up file operations. It is not. You should only enable this setting if another layer is already protecting your disk.
That means a disposable container that gets deleted after every run, or a dedicated virtual machine with no access to your home directory or production volumes. If you run Claude Code directly on macOS, Windows, or a bare Linux host, leave filesystem isolation on. The network sandbox is not a substitute for filesystem controls, and the minor friction of sandboxed file access is far cheaper than recovering from an accidental overwrite or a malicious prompt injection that breaks out of the project folder.
Think of the toggle as a compatibility shim, not a performance knob. It exists for environments where the operating system or orchestrator already handles isolation, and Claude’s own sandbox adds unnecessary complexity.
What the Update Actually Fixes
Beyond the new setting, 2.1.216 closes several practical holes that could let an agent reach places it should not.
Worktree isolation. Subagents can no longer redirect Git commands into a parent or sibling directory outside their own worktree. Previously, a subagent running inside your project could aim Git operations at your shared checkout or adjacent repositories. That matters because many developers keep multiple projects under a common parent folder. Now those boundary-crossing commands fail.
Symlink hardening at the .claude path. Workflow definitions and scheduled tasks used to follow symlinks when writing configuration. An attacker who could create a symlink from .claude to, say, your shell profile or SSH directory could potentially get the agent to write outside the project. The update stops this by refusing to follow symlinks at that path.
Safer rewinds. The /rewind command, which lets you roll back recent changes, now skips symlinked and hard-linked paths. Without this guard, a rewind operation could chase a symlink and overwrite a file far away from your repository. Claude now reports those skipped paths explicitly so you know the boundary held.
Resumed agents keep their restrictions. Background sessions that get stopped and later resumed used to fall back to default tool permissions. If you had intentionally restricted an agent so it could read but not write, a restart could silently restore broader access. Now the original restrictions are persisted and restored with the session.
Picking a Security Profile
Claude Code 2.1.216 organizes these controls into three profiles. Choose based on where you run the tool, not based on what feels fastest.
Default. Filesystem and network sandboxing both stay active. This is the right choice for local development on your laptop or workstation. It protects your home directory, system files, and neighboring projects without requiring you to manage containers.
Compatibility. Filesystem isolation is turned off, but the network sandbox remains. Restrict this profile to disposable containers or VMs where the filesystem is already ephemeral or strictly scoped. Do not use it because you are tired of typing passwords to let the agent access a protected folder.
Managed Hard Gate. Both sandbox layers stay on, and the profile expects additional container policies enforced by your orchestrator or security team. This is built for CI pipelines, remote dev environments, and enterprise setups where defense in depth is mandatory.
If you are unsure which one fits, start with Default. You can downgrade the protection later only after you have verified that your runtime environment genuinely isolates the filesystem by itself.
Upgrading Without Breaking Your Workflow
Beschouw dit niet als een routinepatch die je op een vrijdagmiddag installeert. Het upgradepad in 2.1.216 is rechtlijnig, maar de gevolgen van een verkeerde configuratie zijn dat niet.
Upgrade eerst naar 2.1.216 via je gebruikelijke pakketbeheerder of installer. Kies vervolgens een van de drie isolatieprofielen voordat je agent-taken start. Meng profielen niet tussen lopende sessies zonder te begrijpen welk profiel voorrang heeft.
Voer vervolgens de vijf niet-destructieve grens-tests uit die hieronder worden beschreven. Dit zijn snelle, gescripte controles die bewijzen dat de sandbox zich gedraagt zoals het profiel belooft. Genereer tijdens het testen sentinel-hashes voor bestanden buiten je tijdelijke testrepository. Een sentinel-hash is simpelweg een checksum van een gevoelig bestand of een map die je wilt beschermen. Vergelijk na het uitvoeren van de tests de hashes. Als er iets is veranderd, lekt je isolatie.
Vergelijk ook je logs. Claude Code schrijft weigeringen en sandbox-events naar de lokale logs. Zoek naar expliciete afwijzingen wanneer een geblokkeerde host wordt bereikt of wanneer een subagent buiten zijn worktree treedt. Stille fouten zijn erger dan fouten die direct opvallen, dus controleer of de logs laten zien dat de guardrails ingrijpen.
Rol de wijziging tot slot geleidelijk uit. Begin met een enkel project of een non-productie branch. Laat de nieuwe versie een dag of twee draaien voordat je deze uitrolt naar je hele team of CI-fleet.
Vijf grens-tests die bewijzen dat je sandbox werkt
Voer deze tests altijd uit in een tijdelijke repository gevuld met nepdata. Richt ze nooit op productiecode, echte inloggegevens of live infrastructuur.
Netwerkgrens. Probeer twee eindpunten te bereiken: één die je expliciet hebt toegestaan en één die je hebt geblokkeerd. Een eenvoudige HTTP-aanvraag naar een publieke testservice zoals httpbin.org kan dienen als het toegestane doel, terwijl een aanvraag naar een lokaal metadata-eindpunt of een intern IP-adres moet mislukken. Als de geblokkeerde aanvraag slaagt, is je netwerk-sandbox verkeerd geconfigureerd.
Worktree-isolatie. Voer vanuit een subagent een Git-commando uit dat gericht is op de bovenliggende map. Probeer bijvoorbeeld git -C .. status of laat de agent bestanden beschrijven buiten zijn checkout. Met de fix in 2.1.216 moet dit mislukken. De subagent mag alleen zijn eigen worktree zien.
Symlink-val. Maak een symlink aan binnen je project die naar een map buiten de repository verwijst, zoals /tmp/sentinel-target. Probeer vervolgens een taak of workflow op te slaan onder het .claude-pad die via die link zou schrijven. Controleer na het opslaan de externe map. Als deze nog steeds leeg is, werkt de symlink-hardening.
Rewind-overslag. Richt een map in binnen je repo die een symlink bevat naar een systeembestand of een andere map. Voer /rewind uit op die map. Claude moet de overgeslagen symlinked of hard-linked paden vermelden in plaats van ze te volgen. Controleer of het doel buiten de repo ongemoeid blijft.
Sessie-resurrectie. Start een agent op de achtergrond met een strikte beperking, zoals het uitschakelen van bestandsschrijftools. Pauzeer of stop de sessie en hervat deze vervolgens. Probeer onmiddellijk de agent een bestand te laten schrijven. Als de beperking nog steeds actief is, werkt de fix voor hervatte agents. Als de agent plotseling weer volledige toegang tot tools heeft, ben je nog steeds kwetsbaar.
Tot slot
Claude Code 2.1.216 biedt je meer flexibiliteit dan eerdere versies, maar die flexibiliteit gaat gepaard met een duidelijke opdracht: verifieer voordat je vertrouwt. De nieuwe filesystem-toggle is er niet om je leven gemakkelijker te maken ten koste van de veiligheid. Het is er voor engineers die al een verharde basis onder de tool hebben gebouwd. De echte verbeteringen in deze release zijn de stille guardrails die voorkomen dat subagents in bovenliggende mappen kruipen, die weigeren symlinks te volgen tijdens het schrijven van configuraties, en die de regels onthouden, zelfs na een lange pauze.
Voer de vijf tests uit. Controleer je sentinel-hashes. Lees de logs. Pas dan, en dan pas, laat je de nieuwe versie echt werk verrichten.
Bron: Claude Code v2.1.216 Release Notes
Optionele leercommunity: GyaanSetu op Telegram
