Preserve the namespace that enforces your denies
Use when
Linux
or
WSL2
agent
workloads
need
browser
sandboxes,
rootless
containers,
or
nested
bubblewrap.
Claude
Code
2.1.305
adds
sandbox.allowNestedUserNamespaces;
its
release
explicitly
warns
that
enabling
it
lets
commands
bypass
file
protections.
Action
Keep
sandbox.allowNestedUserNamespaces
false.
Standalone
sandbox-runtime
uses
top-level
allowNestedUserNamespaces.
Verify
the
actual
runtime
and
helper
include
the
0.0.80
namespace
repair;
embedded
helpers
require
rebuilding,
not
just
updated
JavaScript.
Reject
an
unprotected
helper-free
route
before
dispatch.
Do
not
enable
the
switch
or
add
browser
--no-sandbox
merely
to
clear
an
error.
If
nesting
is
essential,
move
that
workload
behind
a
separately
reviewed
outer
boundary
without
sensitive
host
mounts,
then
verify
that
boundary
independently.
Acceptance check
In
a
separately
authorized
disposable
Linux
fixture,
use
dummy
.git/config
contents
and
the
tagged
regression’s
full
namespace/pivot/replacement
chain
through
the
actual
launcher.
Require
refusal
and
byte-for-byte
unchanged
host
contents—not
just
a
failed
direct
write.
Cover the helper route and any helper-free route your deployment uses; unsupported protection must block dispatch. Ordinary workspace writes, threads, and subprocesses must still work. Only inside an additional isolated test boundary, the opt-out control must demonstrate that the same chain can replace the dummy file. Retain versions, helper provenance, effective configuration, statuses, and before/after bytes. Skipped required branches are not passes.
Evidence
The dated Claude release and sandbox-runtime 0.0.80 release align with tagged wrapper, C helper, and regression source. The tests assert unchanged host bytes with protection and actual replacement with the opt-out. Read-only bind mounts alone are insufficient when the command can create new namespaces and detach their mount tree.
Caveat
false
alone
does
not
prove
enforcement.
An
old
embedded
helper
silently
lacks
the
limit.
Without
a
helper,
protection
requires
non-setuid
bubblewrap
0.8.0+
and
weaker
nested
mode
off;
otherwise
execution
can
continue
with
only
a
warning.
Claude’s
shell
sandbox
does
not
cover
file
tools,
MCP
servers,
or
hooks.
These
checks
remain
unexecuted;
no
deployment,
installation,
or
configuration
was
changed.