

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Tools
incomplete
2: Built-in Tools
incomplete
3: Specialized Tools
incomplete
4: Custom Tools
incomplete
5: Create a Custom Tool
incomplete
6: Tool Permissions
incomplete
7: Sandboxing
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
If you've ever thought,
Gee, maybe it isn't smart to allow a stochastic parrot to access all the data on my machine and execute arbitrary code...
rest assured, you're not crazy. That's where sandboxing comes in. You run OpenCode, or something even more autonomous like OpenClaw, in an isolated environment with limited access to your files, credentials, and network.
Then, if it does something dumb, you've at least limited the blast radius. The degree of protection depends on how heavily you locked down the environment.
Sandboxing is especially useful when you're running unfamiliar code or dependency install scripts, working near sensitive data, or letting an agent run more autonomously with fewer approval prompts.
For a familiar project, you may choose to work directly on your dev machine and review any dangerous tool requests. But approving a command does not isolate the code it runs, and careful prompts don't guarantee safe behavior.
There are about as many ways to sandbox as there are to skin a cat.
There isn't a right answer, but be deliberate about what you share with the model! A container can still change a host folder that you mount with write access. Credentials and network access can also let code inside the sandbox affect systems outside it.
One benefit of sandboxing that may surprise you is productivity. In a disposable environment with limited access, you can be much more permissive with your agent and let it run for longer without needing to babysit it the whole time.