WEBVTT

00:00:00.200 --> 00:00:03.860
Docker Sandbox run Claude can be very
useful for,

00:00:03.900 --> 00:00:06.540
well, running Claude Code in a Sandbox.

00:00:06.580 --> 00:00:10.560
But Claude Code also has a built-in
Sandbox mode you can use as an

00:00:10.570 --> 00:00:13.930
alternative if you don't have Docker or
if you don't want to use Docker.

00:00:14.000 --> 00:00:17.820
Or because in that Docker Sandbox certain
features

00:00:17.840 --> 00:00:19.650
might not work the way you want them to
work.

00:00:19.660 --> 00:00:23.560
For example,
Claude Code using the browser,

00:00:23.700 --> 00:00:25.940
I consistently had some problems with
that.

00:00:25.960 --> 00:00:29.640
And for all these reasons,
you can use the built-in Sandbox mode by

00:00:29.680 --> 00:00:33.160
running /sandbox inside of a Claude Code

00:00:33.240 --> 00:00:36.820
session. This will then ask you
which Sandbox mode you

00:00:36.960 --> 00:00:40.920
want to set up. If you want to use auto

00:00:41.000 --> 00:00:43.980
allow or with regular permissions.

00:00:44.060 --> 00:00:48.010
And auto allow is what I want here because
the idea behind this

00:00:48.040 --> 00:00:51.670
Claude Code Sandbox is that it does scope

00:00:51.900 --> 00:00:55.260
the access of Claude Code to this project

00:00:55.300 --> 00:00:59.260
folder and that it also controls the
network access to

00:00:59.300 --> 00:01:03.190
prevent exfiltration of data
that might be stored in your project,

00:01:03.200 --> 00:01:06.820
for example. So if I enable this,
you'll see my

00:01:07.000 --> 00:01:10.870
settings file will have been updated or
if you didn't have a file yet,

00:01:10.880 --> 00:01:14.040
it will have been created. And in there,
you have this

00:01:14.440 --> 00:01:17.400
Sandbox entry now. And of course,
you could have also added it

00:01:17.460 --> 00:01:20.660
manually. With that added, all

00:01:20.920 --> 00:01:24.870
future Claude Code sessions you may start
will run in

00:01:24.880 --> 00:01:28.480
that Sandbox mode.
So you could run Claude Code

00:01:28.560 --> 00:01:32.400
with dangerously skipped permissions

00:01:32.720 --> 00:01:36.280
and since that Sandbox mode is enabled,
you'll

00:01:36.480 --> 00:01:40.220
not accidentally erase your overall hard
drive as you

00:01:40.280 --> 00:01:42.950
also see here.
I'm running in the Sandbox mode.

00:01:42.950 --> 00:01:46.570
And that, of course,
can therefore be a very useful mode

00:01:46.600 --> 00:01:50.400
it gives you a Claude Code experience
where you don't constantly

00:01:50.500 --> 00:01:54.440
have to grant permissions
and at the same time you have some safety

00:01:54.520 --> 00:01:58.450
have that without using Docker
which nonetheless would be a good

00:01:59.100 --> 00:02:02.900
Now in this course,
I'll actually not use this dangerously

00:02:02.910 --> 00:02:06.820
skipped permissions flag.
Instead I'll run Claude Code like this and

00:02:06.860 --> 00:02:10.690
explicitly grant permissions because I
want to see what

00:02:10.720 --> 00:02:14.540
Claude Code wants to do because there
are certain things I don't want it to do.

00:02:14.600 --> 00:02:18.460
Not because I'm afraid of losing my hard
drive but because I see that it's the

00:02:18.520 --> 00:02:20.440
wrong direction into which it's going.

00:02:20.460 --> 00:02:24.030
But that, of course,
comes down to personal preference and

00:02:24.080 --> 00:02:27.180
hands-off approach, using Sandbox and this

00:02:27.260 --> 00:02:31.160
dangerous permissions mode can be a good
way forward.
