Skip to content
Latchkey

Buildkite "No command to run" in CI

A Buildkite command step must define a command (or a script to run). If none is set, the agent reports "No command to run" because there is nothing to execute.

What this error means

A step fails immediately with "No command to run" and no command output, usually right after a pipeline change.

buildkite
Preparing working directory
No command to run
The command exited with status 1

Common causes

The step defines no command

A step has only a label or attributes but no command/commands, so there is nothing for the agent to execute.

A generated step dropped its command

A dynamic pipeline emitted a step whose command was templated to an empty string, leaving an empty command step.

How to fix it

Add an explicit command

  1. Open the step that failed and confirm it has a command or commands key.
  2. Add the command it should run, or remove the step if it was meant to be a wait/block.
  3. Re-run the build.
pipeline.yml
steps:
  - label: "build"
    command: "make build"

Guard templated commands

In a generated pipeline, refuse to emit a step when its command variable is empty so an empty step never reaches upload.

How to prevent it

  • Require a non-empty command on every command step in review.
  • Validate generated steps have a command before uploading.
  • Use wait/block steps explicitly instead of empty command steps.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →