{
  "slug": "gh-stack-sync-prune-deletes-merged-pr-refs-during-sync-ec7e15ba10cc",
  "title": "gh-stack sync --prune deletes merged-PR refs during sync",
  "tools": [
    "gh-stack"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-05-15T18:05:16.000Z",
  "announced_at": "2026-05-15T18:05:16.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When syncing a stack with merged PRs, run `gh stack sync --prune` to automatically delete their local branches. The documentation does not confirm deletion of remote-tracking refs.",
    "examples": [
      "gh stack sync --prune"
    ],
    "gotchas": [
      "Version: v0.0.4",
      "--prune: Automatically delete local branches for merged PRs during sync.",
      "Prerequisite: Install the GitHub CLI extension with `gh extension install github/gh-stack`; the docs require GitHub CLI v2.0+ and Git 2.36+.",
      "Docs conflict: The release note says pruning deletes local branches and remote-tracking refs. The command documentation describes deletion of local branches only and does not confirm remote-tracking ref deletion."
    ]
  },
  "why_it_matters": "During sync, remove local branches and remote-tracking refs for merged pull requests.",
  "sources": [
    "https://github.com/github/gh-stack/releases/tag/v0.0.4",
    "https://github.com/github/gh-stack"
  ],
  "rank": 0.94023,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "recover-20261008",
    "verdict_id": "recover-20261008:recover-20261008-14eb892d437ccab2-0:gate",
    "evidence_hash": "cd1871dd481144832877146aa291d79906c6bf2d3ef0b23925b29edc2962668b"
  },
  "review": {
    "draft_hash": "8720393a0068d1105898bc9703bcad45bf233c31c645467c1e3b04f82e31fe69",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "recover-20261008:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.94 >= 0.9; 2 needed) and Jev gave 0.72 (>= 0.6 needed)."
  }
}
