You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
acq run: acq run --name X -- CMD (no agent positional) silently no-ops instead of failing closed #253
acq run with a --name but no known-agent positional (e.g. acq run --name s2verify -- sh -lc '…') produces no output, creates no sandbox, and drops the post--- command entirely. It should fail closed with a clear message.
Reproduce
./acq --backend msb run --name s2verify -- sh -lc 'echo hi'
# -> prints nothing, creates nothing; `msb ls` shows "No sandboxes found."
Root cause
In the run) dispatch (acq), args are split at -- into create_args and agent_args. first=$(first_positional "$create_args") skips flags and their values, so with only --name s2verify there is no positional and first is empty. That fails both is_known_agent "$first" and acq_backend_exists "$first", so control reaches the final else "pass through" branch:
This calls acq_backend_attach --name s2verify — never provisions, silently discards agent_args, and attaching a nonexistent sandbox no-ops. Net: a silent no-op.
Expected
acq run is create-and-attach for a known agent (acq run opencode …). When invoked without a resolvable agent/sandbox, it should fail closed (non-zero) with an actionable message, e.g.:
acq: run: no agent specified. Usage: acq run <agent|sandbox-name> [create-args] [-- CMD].
To create a non-agent sandbox use `acq create …`; to run a command in an
existing sandbox use `acq exec <name> -- CMD`.
This aligns with AGENTS.md "fail closed on ambiguity — never guess / no silent failures."
Fix is small (guard the empty-first case in the run) branch), but it changes a user-facing error path, so it warrants its own PR + a test-acq case asserting non-zero exit + the message.
Activity
fix(acq): run fails closed on an unresolvable target instead of silen…