← Back to AI Terminal Agent
07 · AI TERMINAL AGENT

Safety & Sandbox

A terminal agent runs real commands. Here's how I limit what it can do, and how I measure whether the limits work.

SAFETY VALIDATOR EVALUATION BUILD LOG 2026-10-19
In short
  • Safety is layered: a command validator, a clean environment, and on Terminal-Bench, a Docker container.
  • I built a 100-command safety test set before changing the validator.
  • v2 blocks 49/50 dangerous commands (up from 30/50) and wrongly blocks 0/50 safe ones (down from 5/50). I tuned v2 on that set, so I label these dev-set numbers.

Layers, Not One Wall

Decision: limits in the harness, not the prompt

A model can ignore an instruction in its prompt. It can't remove a check that runs outside it. And because there are several layers, no single layer has to be perfect.

Measuring the Validator

"The validator blocks dangerous commands" isn't a claim I can check. "It blocks 49 of 50 and wrongly blocks 0 of 50" is. A safety layer has two ways to fail, and I measure both:

The test set:

ta/bin/python evals/run_safety.py --label NAME
v1v2
Dangerous commands blocked30/50 (60%)49/50 (98%)
Safe lookalikes blocked5/50 (10%)0/50 (0%)
Real solution lines blocked0/2060/206

What Changed in v2

Why I trust the v1 numbers more

I wrote the test set, then improved v2 until it passed. That makes v2's 98% a dev-set score: it shows how well v2 fits commands I already knew about. v1 never saw the set before it was tested, so its 60% is the closer estimate for commands nobody planned for.