Back to writing

An autonomous teammate with a leash, and the gap in the leash

I built an agent that opened pull requests on its own against Homies, the app I build on the side. It found work from real signals, implemented it in a git worktree, ran the app's own npm run ci, and proposed a merge that I approved by hand. 33 of its pull requests merged. The project ran for a week and is retired. The full account, with the guardrail table and the run record, is the Autopilot case study.

This post is about one sentence I wrote about it: that the worker never pushing to main was "a capability the process does not possess". It was wrong. The worker lacked one spelling of the push command, not the capability, and how it was wrong is more useful than the claim was.

What I built

The worker was a headless Claude session with an allowlist and a denylist of tools. The denylist was short:

// src/lib/autopilot/tool-sets.ts
export const WORKER_WRITE_DENIED: readonly string[] = [
  "WebFetch",
  "WebSearch",
  "Bash(git push:*)",
  "Bash(gh:*)",
];

After the session exited, the host process, plain Node with no model in it, pushed the branch and opened the pull request. The header comment on worker.ts says "Claude never pushes or touches main". The allowlists lived in one file that the lanes, the org chart and the policy clamp all imported, so they could not drift apart.

What I had actually built

A denied Bash(git push:*) is a pattern matched against a command string. It stops the session from running a command that starts with git push. It says nothing about what any other allowed command may start.

The same file's allowlist has these two lines in it:

"Bash(npm run:*)",
"Bash(node:*)",

node -e can spawn any process. npm run runs whatever a script in package.json says, and the worker could edit package.json. The session ran in a worktree on my machine, and run-session.ts passes no env for the worker, so it inherited the host's environment. The host pushes from that same worktree with git -C <worktree> push -u origin <branch>, using the credentials already on the machine. Everything a push needs was within reach of a process the worker was allowed to start.

So the worker did not lack the capability to push. It lacked one spelling of it. I call the pattern capability laundering: "the agent does not have Git" is false if it can call something that has Git on its behalf. I knew the pattern and did not check my own allowlist for it.

I have no evidence that a session ever did this, and that is worth little. The stream logs that recorded each shell command were local and were pruned. What survives is those merges, every one on a story/* branch, the prefix the host creates. That is consistent with a worker that never tried. It does not show one that could not.

Why nothing caught it

The Autopilot had 299 tests of its own, and they are good tests. They feed the policy clamp a hostile policy and assert the violation list is empty. They audit the shipped presets and the shipped roster against the invariant list. They prove that the ceiling for a code-writing role is exactly the union of what the lanes actually ran.

That is true, and it is a proof about the wrong object. The tests establish that the list is consistent everywhere it is used. No test asks what the entries on the list can reach. A consistency check on an allowlist that contains a general-purpose interpreter passes every time.

The test I would write now does not check the list against itself. It would start a worker session with its real allowlist and its real environment, have it try a push through node -e and through an npm script it had just edited, and assert that nothing reached the remote. By the reading above, that test would have failed on its first run, which is the point of writing it.

What the next system did

A few weeks later I built Hermes, a control plane for a different pipeline, and its third architecture decision record is the fix for this class, though it was not written as one. Codex implementation sessions ran with -s workspace-write and network_access=false. The session could edit files and run tests. It could not reach the network at all, so a git push spelled any way, through any interpreter, had nowhere to go. After the session exited, the hub committed, pushed and opened the PR.

That is what a missing capability looks like. The session was allowed to run node, and it did not matter, because the thing node would have needed was gone. The record's own reasoning is about exfiltration by a prompt-injected implementer, which is the same hole seen from the other side.

Remove the resource, not the command

The rule I would now apply to any agent allowlist: for each thing the agent must never do, name the resource that action needs (a credential, a socket, a writable path), and remove that resource from the process. Then read the allowlist for anything that can start another process, and assume it can start all of them.