Hazmat: Open-source containment for AI agents
Open-source tool Hazmat runs AI coding agents like Claude Code and Codex in a dedicated account, restricting access to credentials and files.
Hazmat is a free open-source containment tool that launches AI coding agents, including Claude Code, Codex, OpenCode and Cursor Agent, under a separate local account, sharing only a chosen project directory and enforcing per-session sandbox policies, network rules, and optional backups. On macOS it backs up the project, builds a session-specific sandbox policy, and starts the harness behind a firewall rule; Linux runs natively and an Apple-container backend is experimental. About 5.5% of the code is a TLA+ formal specification of its containment model.