Get the daily emailDaily email
  1. Home
  2. Research
  3. This story

Caper: consequence-aware approval for coding agents via sandboxed pre-execution

Caper pre-executes each proposed shell command from a coding agent in a snapshotted sandbox, gives an independent approver a bounded report of the observed effects, then commits allowed commands and rolls back blocked ones with an actionable reason. Against…

Published Read the original
Caper: consequence-aware approval for coding agents via sandboxed pre-execution

Why it matters

It shows that approvers judging only the command text, as many coding-agent permission classifiers do, miss harm hidden inside the scripts and tools a command invokes.

What happened

1 min read

Caper pre-executes each proposed shell command from a coding agent in a snapshotted sandbox, gives an independent approver a bounded report of the observed effects, then commits allowed commands and rolls back blocked ones with an actionable reason. Against six existing approvers it has the lowest harmful-outcome rate on SABER (6.7% vs at least 14.8%) and on the new YoloFS-Ext benchmark, where harm hides inside invoked tools (7.8% vs at least 35.3%), while blocking 1.0% of safe twin tasks.

inscraper analysis

Our analysis

Judging by observed effects rather than command text is directly relevant to anyone using auto-approve modes in Claude Code, Codex or Cursor. The obvious limit is commands with external side effects (network calls, sending messages, pushes) that a filesystem rollback can't undo; the abstract doesn't say how those are handled. The latency cost of pre-executing every command isn't reported. YoloFS-Ext is the authors' own benchmark, so part of the large gap may reflect its design.

More in Research