Sandbox first AI coding harness https://chock.ws
  • Zig 99.8%
  • Nix 0.2%
Find a file
2026-10-28 16:39:43 -07:00
.github/workflows fix: build every release artefact with nix on its own runner 2026-09-25 10:24:04 -07:00
build feat: use zig 0.17 2026-10-13 11:55:45 -07:00
docs feat: add project commands and lifecycle hooks 2026-10-28 16:39:43 -07:00
lib feat: add project commands and lifecycle hooks 2026-10-28 16:39:43 -07:00
pkgs/chock refactor: mobile support and cleaner ui 2026-10-25 17:47:50 -07:00
plugins feat(chock-core): give a plugin tool a typed argument schema 2026-09-15 18:27:58 -07:00
src feat: add project commands and lifecycle hooks 2026-10-28 16:39:43 -07:00
test feat: publish a port into the sandbox 2026-10-28 01:58:08 -07:00
.envrc feat: init 2026-08-26 17:10:56 -07:00
.gitignore feat: init 2026-08-26 17:10:56 -07:00
build.zig refactor: mobile support and cleaner ui 2026-10-25 17:47:50 -07:00
build.zig.zon refactor: mobile support and cleaner ui 2026-10-25 17:47:50 -07:00
chock.zon feat: run a session's tool calls in a microVM guest 2026-10-06 08:47:08 -07:00
CODE_OF_CONDUCT.md chore(docs): write the documentation in a human voice 2026-10-13 13:58:48 -07:00
CONTRIBUTING.md refactor: replace chock-sandbox with palisade 2026-10-22 18:22:53 -07:00
flake.lock chore(flake): update 2026-10-13 00:16:49 -07:00
flake.nix refactor: mobile support and cleaner ui 2026-10-25 17:47:50 -07:00
LICENSE Initial commit 2026-08-19 12:22:54 -07:00
README.md refactor: mobile support and cleaner ui 2026-10-25 17:47:50 -07:00
SECURITY.md feat: add openai oauth 2026-10-24 15:10:38 -07:00
treefmt.nix feat: init 2026-08-26 17:10:56 -07:00

chock

Chock is a sandbox first AI coding harness. It runs a coding agent inside the operating system's own sandbox, in a throwaway copy of your project, and it writes every turn to a session log you can read afterwards. Chock is written in Zig 0.16 and builds with zig build.

Why

A coding agent runs commands, writes files, and wants to reach the network. Most harnesses ask the agent to be careful. Chock instead takes the boundary out of the agent's hands, and puts it where the agent cannot turn it off. On Linux a tool call gets a user namespace, a mount namespace, a PID namespace, an IPC namespace and an empty network namespace, under Landlock and a system call filter, in a workspace that is a copy. On macOS it gets Seatbelt for paths, for the network and for signals, and Darwin's own resource limits. macOS gives no bind mount and no usable system call filter, so Chock does not claim those two layers there. Your real project is never written by a tool call, unless you approved a workspace bind in write mode. Every layer that confines the call fails the call if it cannot be applied. The limit layer is the one exception: cgroups are best effort, and chock doctor says so on its own row.

The other half is that every action is reviewable. The session log is the session: every turn, every tool call, every approval and every cost is an event in it. What an agent may do is a static table in chock.zon. Chock reads that table from your project before the sandbox exists, and binds the file into the workspace read only, so the agent can read the rules and cannot change them. The answer is written into the log before the act happens, and an approval nobody answers is a refusal.

Features

Providers

  • ai&
  • Anthropic
  • OpenAI through a ChatGPT account
  • Any OpenAI compatible endpoint

Getting started

chock doctor                        # can this machine contain a session
chock login --provider aiand        # store a credential
chock login --provider openai       # sign in through the browser
cd ~/some-project
chock run "add a test for the parser"
chock -- add a test for the parser  # the same task, with no subcommand
chock                               # the interface, which asks for the task

chock doctor tries each sandbox layer for real and says which are on. chock run names the session before it starts, and chock run --verbose adds the session log's path. Bare chock brings up a full screen interface and asks for the task in it.

A first word is read as a command name, so a task given on the line goes after --. chock fix the parser is refused, because a typed chock rnu that quietly became a task would spend money on a typo. chock -- fix the parser runs, and so does echo "fix the parser" | chock.

Name your providers in ~/.config/chock/config.zon, which Chock reads and never writes. See docs/configure/configuration.md.

Chock is a pre-alpha project. See docs/status.md for what is not built yet and the faults it is known to have.

Documentation

Build with zig build. See docs/ for how Chock works, one page per subject.

Contributing

CONTRIBUTING.md has the repository layout, the coding standards, and the four rules that hold the security model together.

Read SECURITY.md first. It says what Chock protects, what it does not, and how to report a hole in the boundary. The Code of Conduct applies to everyone here.