{
  "slug": "bk-build-retry-failed-jobs-queues-retries-for-failed-jobs-9678ceaa9c83",
  "title": "bk build retry-failed-jobs queues retries for failed jobs",
  "tools": [
    "bk"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-10-20T22:17:17.000Z",
  "announced_at": "2026-10-20T22:17:17.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When failed jobs in an existing build are safe to rerun, run `bk build retry-failed-jobs` with the build number, `org/pipeline/number`, or build URL; use `--pipeline` if inference is ambiguous. Retries queue asynchronously; follow progress with `bk build view` or `bk build watch`.",
    "examples": [
      "bk build retry-failed-jobs 123 --pipeline my-pipeline",
      "bk build retry-failed-jobs acme/my-pipeline/123 --states failed,soft_failed --yes --json",
      "bk build retry-failed-jobs https://buildkite.com/acme/my-pipeline/builds/123 --yes --no-input --text"
    ],
    "gotchas": [
      "Version: v3.64.2",
      "<build-number> (required): Build number, org/pipeline/number, or Buildkite build URL.",
      "--pipeline: Pipeline slug or org/pipeline; inferred from configuration or repository if omitted.",
      "--states: Comma-separated failure states: canceled, expired, failed, soft_failed, timed_out. Omitted or empty retries all retryable failed jobs.",
      "--yes: Skips required confirmation.",
      "--no-input: Without --yes, fails without retrying.",
      "--json: Output as JSON; JSON/YAML never prompts for pipeline selection.",
      "--text: Output as text.",
      "--yaml: Output as YAML; JSON/YAML never prompts for pipeline selection.",
      "Prerequisite: Requires a token with the write_builds scope.",
      "Prerequisite: Confirmation is required unless --yes is supplied; --no-input without --yes fails without retrying.",
      "Requires the `write_builds` token scope.",
      "Confirmation is required unless `--yes` is supplied; `--no-input` without `--yes` fails without retrying.",
      "Malformed selectors and conflicting explicit build/pipeline targets are rejected.",
      "By default, including `--states ''`, all retryable failed jobs are retried. `--states` accepts `canceled`, `expired`, `failed`, `soft_failed`, and `timed_out`.",
      "The operation is not limited to infrastructure failures and does not check whether jobs are safe to rerun; retries can repeat side effects, including deployments.",
      "The API returns `202 Accepted` and asynchronously queues retries; the count reports jobs queued, not completed or successful retries.",
      "If the request is accepted but its count cannot be read, the command fails without a receipt and warns to check the build before resubmitting.",
      "JSON/YAML never prompts for pipeline selection; specify `--pipeline` when inference is ambiguous."
    ]
  },
  "why_it_matters": "Retry retryable failed jobs in an existing Buildkite build after deciding they are safe to rerun.",
  "sources": [
    "https://github.com/buildkite/cli/releases/tag/v3.64.2",
    "https://github.com/buildkite/cli/pull/1053",
    "https://buildkite.com/docs/platform/cli/reference/build"
  ],
  "rank": 0.97036,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "daily-20261026-04",
    "verdict_id": "daily-20261026-04:daily-20261026-04-c6a48706f49c7374-4:gate",
    "evidence_hash": "9514c8805d925d463a66cf298230f5dfd0eaa11dd8da5d6a620f1a3220b0782b"
  },
  "review": {
    "draft_hash": "231ee413f9b702815f2ba8bc45bd06301270d845ec18568225c8e803ac0a5098",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-20T22:17:17.000Z",
    "decision": "daily-20261026-04:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.97 >= 0.9; 2 needed) and Jev gave 0.82 (>= 0.6 needed)."
  }
}
