Sessionboxer

SafeClaw or Sessionboxer: two ways to give each Claude Code session its own Docker container, and what each one leaves to you

SafeClaw runs each Claude Code session in its own Docker container behind a web terminal. What it sets up, what it leaves to you, and when Sessionboxer fits.

Sessionboxer's New session form with Claude Code as the provider, a git URL to clone into /workspace, the agent's model and instructions, and the MCP servers

You want to run Claude Code with --dangerously-skip-permissions, because the prompts every few seconds are slowing you down. You also want it nowhere near your home directory. So you look for something that puts each session in a container, and one of the first results is SafeClaw: "The easiest way to run multiple Claude Code sessions, each in its own container, with a dashboard to manage them all."

Sessionboxer gives each session its own container too, so this comparison is closer than the ones we wrote about worktree tools like Claude Squad. Both tools agree that the container is the boundary. They differ in what goes into the container, how your code and your tokens get there, and what you see while the agent works.

We build Sessionboxer, so read this as a comparison from the maker of one of the two. Everything about SafeClaw below comes from its README, its architecture notes, its Dockerfile and its run script, read on December 3, 2026. The newest commit then was from September 27, 2026.

What SafeClaw is

SafeClaw is a small MIT-licensed project by ykdojo, who also maintains the claude-code-tips repository. It is a Dockerfile, a few shell scripts and a Node.js dashboard. You build the image once with ./scripts/build.sh, then start sessions with ./scripts/run.sh:

./scripts/run.sh -s work                         # container safeclaw-work
./scripts/run.sh -s research -v ~/notes:/home/sclaw/notes
./scripts/run.sh -s fix -q "why does the login test fail?"

Each container runs Ubuntu 24.04 with Node.js 24, the GitHub CLI, the Playwright MCP server with a headless Chromium, and Claude Code pinned to version 2.1.283 with the auto-updater turned off. Claude Code starts with --dangerously-skip-permissions, automatic compaction off and Opus 5.5 as the default model. There are also skills for reading Slack (read-only, with a token), downloading YouTube videos and reading public Google Docs.

You talk to Claude Code through ttyd, a web terminal, on http://localhost:7681 (the next session gets the next free port). Inside it, tmux keeps the session alive. You get the real Claude Code terminal interface, status line and all. The architecture notes say that was the point: no custom UI on top of the Agent SDK.

The dashboard, node dashboard/server.js, opens on port 7680. It creates sessions with a folder to mount and a first question, lists them with start, stop and delete buttons, and shows each live terminal in an iframe. Both the dashboard and the terminals listen on 127.0.0.1 only.

Conversation history goes to ~/.config/safeclaw/sessions/<name>/ on your machine, mounted into the container, so rebuilding the image does not lose it.

How your code gets in

SafeClaw uses a Docker bind mount. -v ~/myproject:/home/sclaw/myproject puts your actual folder inside the container. Whatever the agent writes there is written to your disk at once. That is convenient, since your editor sees the changes live, and it also means a bad rm -rf or a broken migration script lands on your real copy. Commit before you start, or mount a fresh clone.

Without -v, the container has no project in it, and the agent can clone what it needs with the gh token you gave it.

Sessionboxer starts a session from a git URL it clones into the box, or from a folder on your machine that it copies in. A copied folder stays untouched while the agent works. When you want the result, Pull to folder… shows which files would be added or changed and writes them only after you confirm. The trade is one extra step before your editor sees the change.

How your tokens get in

SafeClaw keeps secrets as files in ~/.config/safeclaw/.secrets/. The file name becomes the variable name: CLAUDE_CODE_OAUTH_TOKEN from claude setup-token, GH_TOKEN from gh auth token, and anything else you add. Each time run.sh starts a session, it writes every file in that folder into /home/sclaw/.env inside the container, and BASH_ENV makes every bash command source it. The architecture notes say it plainly: the variables are available everywhere, including in Claude's own bash commands.

So every session gets every secret, and every command the agent runs can read them. If you add a Slack token for one research session, your coding sessions have it too. SafeClaw's own advice helps here: it recommends a separate GitHub account for SafeClaw, so the token the agent holds can only reach what you allow that account to reach. We would follow that advice with any tool, and our post on keeping secrets away from your coding agent goes further.

The notes also mention a limit of the setup-token login: it only has the user:inference scope, so /usage does not work and the status bar says "Claude API" instead of your plan.

In Sessionboxer you connect each agent once in Settings, with the same claude setup-token for Claude Code. The token goes into the boxes of the sessions that use it, on tmpfs, and never into a snapshot. A GitHub login is an entry you switch on or off per session, and when it is off the login is gone from that box. The agent in a box still holds a real token while it works; Sessionboxer does not hide it from the agent.

What the agent can see and do

In SafeClaw, the agent's view of the world is the terminal and a headless Chromium through Playwright MCP. That covers a lot: run the tests, open the page, read the DOM, take a screenshot.

A Sessionboxer box is a bigger machine. It runs a Linux desktop with Firefox that the agent drives with screenshots, clicks and typing, and you watch the same screen in your browser and can take the mouse. Next to the chat there are terminals and VS Code running in the box. After a turn you can snapshot the whole machine and fork it, packages and browser state included, and hand the copy to a different agent.

That last part is the other big difference. SafeClaw is built for Claude Code only. Sessionboxer runs the agents you already pay for: Claude Code, Codex, Cursor, OpenCode, Devin, Gemini CLI, GitHub Copilot and several more, each in the same kind of box.

What Sessionboxer does not do

It does not give you the native Claude Code terminal as the main view. You talk to the agent in Sessionboxer's own chat, which shows the context gauge, the turn markers and the files the agent produced. If you live in Claude Code's interface and want nothing between you and it, SafeClaw gives you exactly that.

It is also heavier. Each box runs a desktop, and the first session downloads a sandbox image of 1.2 to 1.4 GB compressed. SafeClaw's image has no desktop at all.

And it is a larger project. SafeClaw is short enough to read in an evening, and changing a default means editing a Dockerfile you understand. Sessionboxer is a control plane with a web app, a database and a daemon in every box. You get more features and more code to trust.

Which one to pick

SafeClaw Sessionboxer
Agents Claude Code Claude Code, Codex, Cursor, Gemini CLI and more
Isolation Docker container per session Docker container per session, or a Windows/macOS VM
Your code Bind mount: edits land on your disk Clone, or a copy you pull back after a diff
Secrets Every file in .secrets/ in every session's environment Per agent and per session, on tmpfs, never in snapshots
What you see Claude Code's own terminal, via ttyd A chat, plus desktop, terminals and VS Code
Browser for the agent Headless Chromium via Playwright MCP Linux desktop with Firefox, watched live
Snapshots and forks — Whole machine, per turn or by hand
Licence MIT MIT

Pick SafeClaw if you only use Claude Code, want its real terminal interface, and like a setup small enough to read and change yourself. Mount a clone, not your only copy, and keep the .secrets/ folder to what every session should have.

Pick Sessionboxer if you want more than one agent, a desktop the agent can use and you can watch, a copy of your code instead of the original, and permission-free runs where the box is the limit. Our guide to running Claude Code with --dangerously-skip-permissions safely covers the same question for other setups.

Features mentioned

Keep reading