claude-airlock
A hardened Docker sandbox launcher for Claude Code that records every connection, DNS lookup and process from outside the session.
At a Glance
Self-hosted, MIT-licensed hardened Docker sandbox launcher for Claude Code. Claude Code usage itself is an external cost.
Engagement
Available On
Alternatives
Listed Dec 2026
About claude-airlock
claude-airlock is an open-source launcher that runs Claude Code inside a hardened Docker container with only the current project mounted. It records network connections, DNS lookups and processes from outside the session, so the session cannot tamper with the records. The README notes it is still under development, with settings and behaviour that may change in breaking ways, and that it is developed mostly on Linux with macOS seeing less use.
What It Is
claude-airlock wraps the claude command. Run from a project directory, it builds an image on first use and starts a session in a container with a read-only root filesystem, all capabilities dropped and a network of its own. .env files read as empty and Claude's own configuration is read-only. On Linux the container can optionally run on gVisor. It works from any shell and from editors that can launch a custom claude program, such as Emacs with claude-code.el.
Recording and reviewing sessions
The launcher records every connection, DNS lookup and process from outside the sandbox, and copies the transcript as it is written so that changed or removed lines can be flagged. claude-airlock --trace shows what the latest session ran, wrote and reached on the network. It can list sessions, follow them live, sum them up over a period, or output JSON Lines. When a session ends, the launcher warns if it changed files that run commands on the host, such as git hooks or a Makefile.
Line mode and opt-in doors
Sessions run in line mode by default, a simpler append-only UI. It shows the connections, processes and file changes under each command, and flags refused connections, failed commands, writes outside the project and possible prompt injections. The native Claude Code UI can be restored with a setting. An egress domain filter, SSH agent forwarding, Docker socket access and claude.ai connectors are each off until enabled. Further options cover extra mounted directories, hidden file names, protected paths, resource limits, tmux sessions that can be attached from another terminal, and image features.
Known limits
The README states that the sandbox limits what a session can reach but does not make a read-write project safe to trust blindly. By default, tools run without asking. The login is readable inside the sandbox, and Anthropic's API is always allowed.
Setup path
It requires Docker and Python 3.13 or later, using only the standard library. Install by cloning the repository and adding its bin directory to the PATH.
Collections
Popular collections
- Pick Up Where Your Agent Left Off
Collection by @caiovalverde
- UI Design Skills for Coding Agents
Collection by @mayachen
- Find the Ways Your AI App Can Fail Before Launch
Collection by @samirhaddad
- Give Your AI Agent the Meaning Behind Your Database
Collection by @danielokafor
Add claude-airlock to one of your collections.
Community Discussions
Be the first to start a conversation about claude-airlock
Share your experience with claude-airlock, ask questions, or help others learn from your insights.
Pricing
Open Source
Self-hosted, MIT-licensed hardened Docker sandbox launcher for Claude Code. Claude Code usage itself is an external cost.
- MIT License
- Contained session: only the project mounted, read-only root filesystem, all capabilities dropped
- Records every connection, DNS lookup and process from outside the session
- --trace session review
- Line mode
Capabilities
Key Features
- Hardened Docker container with only the current project mounted
- Read-only root filesystem with all capabilities dropped
- Optional gVisor runtime on Linux
- Hides .env files and configurable secret file names
- Out-of-session recording of connections, DNS lookups and processes
- -trace session review with follow, stats and JSON Lines output
- End-of-session check for changed host-executable files
- Line mode UI flagging refused connections and possible prompt injections
- Opt-in egress domain filter
- Opt-in SSH agent forwarding and Docker socket access
- Extra read-write or read-only directory mounts and git worktree sessions
- tmux sessions attachable from another terminal
- Configurable memory, CPU and process limits
- Editor integration via custom claude program
