Skip to content

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.

Owl mascot

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

MistakeHow you notice itThe fix
Container lacks needed toolsInstallation fails mid-taskUse a custom Docker image with pre-installed dependencies
OOM during large tasksContainer crashesIncrease Docker memory limits or use Kubernetes scaling

Next: Skills & Customization