--copies returns 409 capability_unavailable with outcome not_started, the run was not accepted
and no sandbox started. Run the agent without copies.
What a Run Is
- A copy’s command must finish without anyone typing, so the manifest sets
interactive: false. A run refuses an interactive manifest. - Copies are independent. A copy that fails to start doesn’t stop the others, and BoxRouter doesn’t retry it.
- Starting a run prints a run ID. You read and stop the run with it.
- Copies bill like any sandbox: your provider keys or your
Credits pay for them. With neither, the run is accepted and every copy ends
start_failedwithinsufficient_credit.--providerpins where the copies run.
Start a Run
boxrouter.yaml
uuidgen. Each example prints an idempotency key before sending the request. The SDK examples pass the manifest above as an object.
429 run_limit_exceeded before
anything starts; a count below 1 or not a whole number is refused as invalid_request.
A run refuses these three things:
--repotogether with--copies. Put the repository in the manifest’scodefield instead.- Interactive catalog agents.
secret_values. Save the secrets first (see secrets).
Read the Run
--results in the CLI, or include: 'command' (include= in Python)
on the API read, to query the running sandboxes. The CLI also summarizes the copies as a run state; the SDK examples print each copy’s own status.
A copy can be queued, preparing, started, start_failed, stopping, stopped, finished or
unknown. A failed copy includes its error code, message and fix.
The run’s state describes the copies together:
running: not every copy has ended yet.finished: every copy has ended and all started.failed: every copy has ended and at least one did not start.stopped: the run was stopped.
started copy, --results also asks its sandbox what the command is doing: running, exited
with the exit code, timed_out or unknown.
- It waits five seconds in total, so a slow or unreachable sandbox reads
unknowninstead of delaying the rest. - It never returns output.
Get Your Results
BoxRouter keeps each copy’s exit code and finish time. Files the command wrote exist only on its sandbox’s disk. Read them before you stop the run.SANDBOX_ID from the copy’s sandbox= field. Without code, the command uses the sandbox’s
starting directory. With code, it runs in the checkout directory under the sandbox user’s $HOME.
Set an absolute output path, as in the example, when you need to read a file later.
BoxRouter does not collect files for you; read results before stopping the run, or have the agent
push a branch.
read is limited by the route’s file_transfer_bytes (see limits).
For larger results, have the agent push a branch. To keep files across sandbox runs, attach a
Volume when the sandbox starts.
Stop and Clean Up
To stop one copy, use its zero-based index from the run status:stopped or is start_failed with no sandbox ID.
stopping means cleanup is not yet confirmed.
To stop the run:
stopped or is start_failed with no
sandbox ID. A failed copy without a sandbox keeps its start_failed status. Other statuses mean cleanup
is still in progress or unconfirmed.
Copies keep the exit code and finish time they recorded. Stopping twice is safe, and a run ID from another
workspace reads as not found.
Next Steps
Configure a Launch Manifest
Write the unattended manifest a run needs.
Supply an Agent's Secrets
Save the secrets each copy reads.
Launch Your Own Agent
A repository, a manifest or an image instead of the catalog.