Skip to content
Latchkey

Buildkite "artifact download ... 404" in CI

A buildkite-agent artifact download step fetches files uploaded earlier in the build. A 404 means no artifact matches the query for the target build, so there is nothing to download.

What this error means

The download step fails with a 404 for the artifact path, and the expected files are missing in the consuming step.

buildkite-agent
$ buildkite-agent artifact download "dist/app.tar.gz" .
2026-06-30 12:00:01 FATAL Failed to find artifacts: 404 Not Found

Common causes

The upload step did not run or failed

The artifact was never uploaded because the producing step failed or was skipped, so the download finds nothing.

The path or build scope does not match

The download glob differs from the uploaded path, or --build/--step points at a build that never held the artifact.

How to fix it

Order upload before download and match paths

  1. Confirm the upload step ran and reported the file before the download runs.
  2. Use the same path in download as in upload.
  3. Add a wait step so the producing step completes first.
pipeline.yml
steps:
  - command: "buildkite-agent artifact upload dist/app.tar.gz"
  - wait
  - command: "buildkite-agent artifact download dist/app.tar.gz ."

Scope the download to the right build

When downloading across builds, pass the correct --build id so the query targets a build that actually uploaded the artifact.

Terminal
buildkite-agent artifact download "dist/*" . --build "$UPSTREAM_BUILD_ID"

How to prevent it

  • Put a wait between upload and download steps.
  • Keep upload and download globs identical.
  • Verify the upload succeeded before consuming the artifact.

Related guides

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