Docker Sandbox run Claude can be very useful for,
well, running Claude Code in a Sandbox.
But Claude Code also has a built-in Sandbox mode you can use as an
alternative if you don't have Docker or if you don't want to use Docker.
Or because in that Docker Sandbox certain features
might not work the way you want them to work.
For example, Claude Code using the browser,
I consistently had some problems with that.
And for all these reasons, you can use the built-in Sandbox mode by
running /sandbox inside of a Claude Code
session. This will then ask you which Sandbox mode you
want to set up. If you want to use auto
allow or with regular permissions.
And auto allow is what I want here because the idea behind this
Claude Code Sandbox is that it does scope
the access of Claude Code to this project
folder and that it also controls the network access to
prevent exfiltration of data that might be stored in your project,
for example. So if I enable this, you'll see my
settings file will have been updated or if you didn't have a file yet,
it will have been created. And in there, you have this
Sandbox entry now. And of course, you could have also added it
manually. With that added, all
future Claude Code sessions you may start will run in
that Sandbox mode. So you could run Claude Code
with dangerously skipped permissions
and since that Sandbox mode is enabled, you'll
not accidentally erase your overall hard drive as you
also see here. I'm running in the Sandbox mode.
And that, of course, can therefore be a very useful mode
it gives you a Claude Code experience where you don't constantly
have to grant permissions and at the same time you have some safety
have that without using Docker which nonetheless would be a good
Now in this course, I'll actually not use this dangerously
skipped permissions flag. Instead I'll run Claude Code like this and
explicitly grant permissions because I want to see what
Claude Code wants to do because there are certain things I don't want it to do.
Not because I'm afraid of losing my hard drive but because I see that it's the
wrong direction into which it's going.
But that, of course, comes down to personal preference and
hands-off approach, using Sandbox and this
dangerous permissions mode can be a good way forward.