Appearance
Sandbox Isolation & Security
Every OpenHands agent session runs in an isolated Docker container. The agent can install packages and execute scripts without touching your host. This covers the sandbox model and Kubernetes runtime support.

What you'll learn
- Each session gets its own Docker container, destroyed when the session ends
- Host filesystem access only through explicitly mounted volumes
- Kubernetes runtime support for production with resource limits
Build it
The sandbox is automatic when you start OpenHands. Each new session creates a fresh container. Network access can be restricted. Resource limits prevent runaway agents.
What goes wrong
| Mistake | How you notice it | The fix |
|---|---|---|
| Container lacks needed tools | Installation fails mid-task | Use a custom Docker image with pre-installed dependencies |
| OOM during large tasks | Container crashes | Increase Docker memory limits or use Kubernetes scaling |
Next: Skills & Customization