CLI / MVP

convoy run

Validate the folder, send it to convoyd as a bundle, start a new run of the swarm, and exit. The swarm keeps running on the server.

View .md
Text
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

  1. Runs the same checks as convoy validate. Errors exit 3.
  2. Builds the bundle: every .cvy file, every file named in a file() call, and the value of every env() argument read from your shell. A missing env() variable is an error before any network call. Provider API keys are not read or sent. convoyd reads them from its own environment.
  3. Sends PUT /v1/swarms/{name} with the bundle as JSON. The name is the swarm block’s label, or --name if given.
  4. 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.
  5. Handles the response, below.

Flags

FlagMeaning
--nameOverride 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.

Terminal
$ 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_chips

The 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.

Terminal
$ 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 $?
1

422, rejected. The body carries diagnostics. Exit 3. Besides the errors validate reports, the server makes checks it alone can:

CodeMeaning
overseer_missingThe swarm block has no overseer and convoyd has no --overseer-provider and --overseer-model
missing_envA 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_failedA 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_modelmax_cost_usd is set and an agent model, or the overseer model, has no price
bundle_version_unsupportedThe 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.

Terminal
$ convoy run
error[overseer_missing]: declare overseer = { provider, model } on the swarm block, or start convoyd with --overseer-provider and --overseer-model
$ echo $?
3

400 name_mismatch. The URL name and the swarm block’s name differ. Exit 1.

Exit codes

CodeCause
0Run accepted
1Server unreachable, swarm_active, or another server error
2Usage error
3Validation 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.

Last updated 2026-11-05
esc
    ↑↓ to move · ↵ to open
    Menu
    Get started
    IntroductionInstallQuickstartYour first swarm
    Concepts
    Swarms and runsAgents and turnsTopics and the boardThe overseerSpawning agentsBudgets and limits
    DSL
    Language rulesswarmprovidertopicagentReferences and functionsValidation rules
    Providers
    Provider typesUsing a provider typeWriting a provider type
    CLI
    Overviewconvoy goalconvoy validateconvoy runconvoy statusconvoy watchconvoy sayconvoy stopconvoy uiconvoy provider
    Runtime
    convoydControllerMessage boardRunnerSwarm tools (MCP)Web UIDurability
    Architecture
    OverviewRepository layoutSeams and contractsHTTP API
    Examples
    OverviewWriter and criticResearch teamCode teamPaperBench replicationCommit0 libraryVending-BenchSWE-Lancer bountyτ²-bench loop
    Inspiration
    What we borrowedThe harness landscape