Agent Sandbox Registry

agent-sandbox

Decision: abx run (Named Commands) vs abx exec (Raw Shell)

无中文版

.agents/notes/superseded/2026-09-03-cli-run-vs-exec.md

Decision: abx run (Named Commands) vs abx exec (Raw Shell)

Status: superseded Superseded-by: 2026-10-13-fixed-command-surface

Problem

Users need to invoke template-declared named commands from the CLI, but the existing abx exec runs an arbitrary raw shell string. We need a clear division of labor between running a raw command and dispatching a template's named, parameterized command.

Decision

Add a new top-level command abx run and keep abx exec: - abx run <sandbox_id> <command_name> [--arg k=v ...] — template-aware dispatch of a named command declared in the sandbox's template custom_commands. Arguments are supplied as repeatable --arg key=value pairs, validated against the command's args schema, and shlex.quote()-escaped. - abx exec <sandbox_id> <command> — unchanged; runs a raw shell command string (requires the shell capability).

Semantic split: exec = raw shell; run = template-declared named command.

API Design

abx run <sandbox_id> <command_name> [options]

Options:
  --arg, -a <KEY=VALUE>     named-command argument (repeatable)
  --timeout, -t <seconds>   override the command's declared timeout
  --json, -j                structured output

Examples:
  abx run sb-abc123 serve --arg port=9000
  abx run sb-abc123 migrate --arg target=head --json

Alternatives considered

Dependencies

Test Strategy

Acceptance criteria