Claude Code sandbox: full permissions, no risk to your laptop

Let Claude Code run any command without asking, with no way to reach your laptop, your keys or your network. Agenhood runs each Claude Code agent in its own hardened Docker container on your server.

Why --dangerously-skip-permissions is risky on your laptop

Claude Code is most useful when it doesn't stop to ask before every command. The --dangerously-skip-permissions flag turns those prompts off.

On your laptop, though, Claude Code runs as you. With the prompts off, a prompt injection hidden in a README, or one wrong rm -rf, can reach your SSH keys, your cloud logins and every device on your network. So most people keep the prompts on, and the agent can't work while they are away.

Run Claude Code with full permissions, safely

Agenhood runs the real Claude Code CLI with the prompts off, inside a locked-down Docker container on your server. Claude Code can do anything inside it, and almost nothing outside it:

  • No access to your files. It sees only its own workspace, never your home folder.
  • No access to your keys. No SSH keys, cloud logins or browser data inside the container.
  • No access to your network. The only way out is a filter that blocks private addresses and cloud metadata.
  • No control of the host. It runs as a normal user, with limits on CPU and memory.
  • Undo for bad runs. The workspace is saved after each task, so you can roll back. In a Git repo, its history does the job.
Internal network, no gateway Agent container claude -p /workspace volume Egress proxy filters every request Internet LLM APIs, web allowed Blocked: 10/8, 172.16/12, 192.168/16, loopback, 169.254/16 (cloud metadata)

The AI agent sandbox page explains each layer in more detail.

Let Claude Code work while you are away

Because it runs on a server, Claude Code keeps working when your laptop is closed. Give it tasks from the web console, the API, a schedule or a GitHub comment, and watch every step live. Its files stay in place between tasks, and idle agents pause until the next one. See self-hosted coding agents for coding work.

Use an Anthropic API key, or sign in with your own Claude plan. MCP servers and skills work the usual way.

Run Claude Code in Docker with Agenhood

With Agenhood running and an Anthropic key added, two calls create an agent and give it a task:

Terminal
# Create a Claude Code agent
curl -X POST http://localhost:5173/v1/containers \
  -H "Authorization: Bearer tk_live_seedkey" \
  -H "Content-Type: application/json" \
  -d '{"name": "claude-code-sandbox", "config": {"driver": "claude-code", "model": "sonnet"}}'

# Give it a task
curl -X POST http://localhost:5173/v1/containers/$AGENT_ID/tasks \
  -H "Authorization: Bearer tk_live_seedkey" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Summarize the latest release notes and save them to notes.md"}'

The self-hosted AI agent platform page shows what else you get.

When Docker Sandboxes or a local container is enough

If you work alone and sit in front of the agent, a local option may be simpler. Docker Sandboxes (sbx run claude) runs Claude Code in a sandbox on your machine. Your own dev container works too, if you are happy to lock it down yourself.

Pick Agenhood when you want Claude Code to work without you: on a schedule, from GitHub, through an API, or as several agents for a team.

What it doesn't do

  • A hardened container, not a VM. Agents share the host's kernel. For a hard boundary, give Agenhood its own VM.
  • Anthropic models only. For OpenAI models, use a Codex or Opencode agent instead.
  • Plans are for personal use. For heavy or scheduled work, use an API key, not a Pro or Max plan.

Questions people ask

How do I use --dangerously-skip-permissions safely?

Run Claude Code somewhere it cannot hurt you: a locked-down container with no access to your files, keys or network, and a way to undo its changes. Agenhood sets this up for every Claude Code agent.

Can I run Claude Code in a Docker container with my Pro or Max plan?

Yes. You can sign in with your own plan on your own server. For scheduled or heavy work, we recommend an Anthropic API key, and don't share one person's plan across a team.

Can Claude Code in the sandbox reach my local network?

No. Its only way out is a filter that blocks private addresses, your router and cloud metadata endpoints.

What if Claude Code deletes my files?

It can only touch its own workspace, never your machine. The workspace is saved after every task, so you can roll back a bad run. In a linked Git repo, its history does that job.

Can I run several Claude Code agents in parallel?

Yes. Each agent has its own container and workspace. How many run at once depends on the size of your server.

Does the Claude Code sandbox support MCP servers and skills?

Yes. Attach MCP servers and skills to an agent, and Claude Code picks them up the usual way.

Run it locally in one command

You need Docker and Python 3.12 or newer. make dev builds the agent image, starts the stack, runs migrations, creates a login and prints the console URL.

Terminal
git clone https://github.com/appssemble/agenhood.git
cd agenhood
make dev