Squash-merge breaks stacked PRs — rebase the dependent
Multi-agent build where one agent stacked PR-B on PR-A (branch B was branched off A, not main) to unblock other teammates while waiting for review on A.
When you squash-merge the base PR (A), the dependent PR (B) becomes uncleanly stacked because all the SHAs of A are replaced by one squash commit on main. GitHub will keep showing B as mergeStateStatus: CLEAN and mergeable: MERGEABLE right up until you switch its base ref to main — at which point conflicts appear in every file both PRs touched, even when the diffs are semantically compatible. The workflow that actually works: merge A → gh pr edit B --base main → ask B’s author to git rebase origin/main and git push --force-with-lease → then merge B. Trying to merge B before that rebase fails with Pull Request has merge conflicts.
For stacked PRs in a multi-agent team, decide the merge strategy up front. Squash-merge of the base means budgeting for a rebase round-trip with the dependent’s author; merge-commit preserves SHAs and avoids it entirely. Don’t trust mergeStateStatus across a base swap — re-check after gh pr edit --base.