gitwtfhub

wtf is agent-run?

sin-ack/agent-run — explained in plain English

Analysis updated 2026-05-18

25RustAudience · developerComplexity · 3/5LicenseSetup · moderate

TL;DR

A tiny Rust CLI that sandboxes coding agents like Claude Code, Codex, and OpenCode on Linux using bwrap, keeping the filesystem read-only except for paths you explicitly allow.

Mindmap

mindmap
  root((agent run))
    What it does
      Sandboxes coding agents
      Read only filesystem
      Per tool writable paths
    Tech stack
      Rust
      bwrap
      TOML config
      Bazel build
    Use cases
      Run Claude Code sandboxed
      Avoid permission prompts
      Multi agent support
    Limitations
      Catches mistakes not attacks
      Linux only
      Needs user namespaces

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Run Claude Code, Codex, OpenCode, or pi inside a sandbox that cannot touch files outside your project.

REASON 2

Avoid repeated permission prompts from a coding agent while still limiting its filesystem access.

REASON 3

Configure per-tool writable paths so different coding agents can save their own config and cache files.

What's in the stack?

RustbwrapTOMLBazel

How it stacks up

sin-ack/agent-runasync-herald/herald-enginechrichuang218/claude-desktop-zh
Stars252525
LanguageRustRustRust
Setup difficultymoderatemoderateeasy
Complexity3/53/52/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Linux only, requires bwrap support and unprivileged user namespaces enabled.

GPL v3 license: free to use, but any modified version you distribute must also be released as open source under GPL v3.

Wtf does this do

Agent-run is a small command line tool for Linux that runs a coding agent like Claude Code, Codex, OpenCode, or a tool called pi inside a sandbox, so the agent cannot touch files outside your project even if it tries. The author built it because permission prompts from these agents got annoying, and wanted the agent to do whatever it wants inside the project folder while everything else on the machine stays read-only. The tool is a single small binary, under one megabyte, that works on recent Linux systems using either the aarch64 or x86_64 processor architecture. It uses a Linux sandboxing tool called bwrap internally, embedded inside the binary itself, and requires unprivileged user namespaces to be enabled on your system. You can install it through Nix, through a tool called Mise, or by downloading the binary directly from the project's releases page and putting it in your PATH. Configuration is written in TOML, a simple settings file format, with an available JSON schema so editors can offer autocomplete. By default, the whole filesystem is mounted read-only inside the sandbox, and you list specific paths, like a project directory or a tool's own config folder, that should be writable instead. You can also control whether the sandbox has network access and which environment variables get passed through from your host machine. Each supported agent, such as Claude Code or OpenCode, needs its own small set of writable paths configured so it can save its settings and temporary files correctly. The author is clear that this is meant to catch mistakes an agent might make, not to stop a truly malicious program, since the read-only filesystem access alone still allows some forms of information leakage if network access is enabled. For that stronger level of isolation, the README suggests looking at microVMs instead. The project is written in Rust, built with Bazel, and released under the GNU General Public License, version 3.

Yoink these prompts

Prompt 1
Install agent-run and write a TOML config that lets Claude Code run sandboxed in my project directory.
Prompt 2
Explain what agent-run's threat model does and does not protect against.
Prompt 3
Add a new tool config to agent-run for a coding agent that needs a writable temp directory.
Prompt 4
How do I enable network access but keep the rest of the filesystem read-only in agent-run?

Frequently asked questions

wtf is agent-run?

A tiny Rust CLI that sandboxes coding agents like Claude Code, Codex, and OpenCode on Linux using bwrap, keeping the filesystem read-only except for paths you explicitly allow.

What language is agent-run written in?

Mainly Rust. The stack also includes Rust, bwrap, TOML.

What license does agent-run use?

GPL v3 license: free to use, but any modified version you distribute must also be released as open source under GPL v3.

How hard is agent-run to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is agent-run for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.