convoy run [--dir <path>] [--name <swarm>] [--server <url>]run never waits for the swarm. Its last line is watch with: convoy watch <name>.
What it does
- Runs the same checks as
convoy validate. Errors exit 3. - Builds the bundle: every
.cvyfile, every file named in afile()call, and the value of everyenv()argument read from your shell. A missingenv()variable is an error before any network call. Provider API keys are not read or sent. convoyd reads them from its own environment. - Sends
PUT /v1/swarms/{name}with the bundle as JSON. The name is the swarm block’s label, or--nameif given. - convoyd resolves each provider’s type, fetching one it does not hold, and starts every driver plugin once in check mode before it creates the run. The run records the type version and digest each provider block resolved to.
- Handles the response, below.
Flags
| Flag | Meaning |
|---|---|
--name | Override the swarm name taken from the swarm block |
Responses
201, accepted. The server created a run. A new swarm name starts at run 1. If the swarm exists and its latest run has ended (Done, Stopped, or Failed), this is the next run number. Earlier runs are kept and stay readable with --run. For each provider whose type is not built in, run prints the version and digest the run uses, so you can see what will execute.
$ convoy run
swarm "edge_chips" run 3 accepted: 7 agents pending
provider fast: acme/acme 1.4.2 sha256:9f2c3a71b0d4…
AGENT STATUS PROVIDER MODEL
critic pending anthropic claude-opus-5
overseer pending anthropic claude-sonnet-5
researcher[cerebras] pending anthropic claude-sonnet-5
researcher[groq] pending anthropic claude-sonnet-5
researcher[nvidia] pending anthropic claude-sonnet-5
researcher[tenstorrent] pending anthropic claude-sonnet-5
writer pending openai gpt-6.1-sol
watch with: convoy watch edge_chipsThe count includes the overseer, which every run gets.
409 swarm_active. The latest run is still Pending or Running. Nothing changes. There is no flag to replace a running swarm. Stop it first.
$ convoy run
swarm "edge_chips" is running (run 3, started 12:04:02). Wait for it to finish, or stop it with: convoy stop edge_chips
$ echo $?
1422, rejected. The body carries diagnostics. Exit 3. Besides the errors validate reports, the server makes checks it alone can:
| Code | Meaning |
|---|---|
overseer_missing | The swarm block has no overseer and convoyd has no --overseer-provider and --overseer-model |
missing_env | A variable a provider reads, such as its api_key, is not set in convoyd’s environment. The message names the variable, never a value |
provider_check_failed | A driver plugin failed its check: its command did not exit 0 or did not report a runner contract convoyd speaks. The message carries the end of its output |
unpriced_model | max_cost_usd is set and an agent model, or the overseer model, has no price |
bundle_version_unsupported | The bundle format is newer than the server understands |
A provider type the server cannot resolve is TS016 among the diagnostics. A fetch that takes longer than convoyd’s --provider-timeout answers 504 provider_timeout and exit 1; the fetch continues, so running again shortly succeeds.
$ convoy run
error[overseer_missing]: declare overseer = { provider, model } on the swarm block, or start convoyd with --overseer-provider and --overseer-model
$ echo $?
3400 name_mismatch. The URL name and the swarm block’s name differ. Exit 1.
Exit codes
| Code | Cause |
|---|---|
0 | Run accepted |
1 | Server unreachable, swarm_active, or another server error |
2 | Usage error |
3 | Validation errors locally, a missing env() variable, or a 422 from the server |
API endpoint
PUT /v1/swarms/{name}. See The convoyd API for the server’s side: the transaction that creates the run, agents, topics, and overseer row.
Related
- convoy watch to follow the run.
- convoy stop to free a swarm name.
- Swarms and runs
- Budgets and limits
- Provider types