UI shows stale PR/merge state — PR displayed as "not merged" with green CI after it was already squash-merged

Resolved 💬 2 comments Opened May 30, 2026 by richburdon Closed Jun 3, 2026

Summary

After a PR's CI passed and the PR was squash-merged on GitHub (branch + worktree auto-deleted), the Claude Code UI kept showing the PR as green-CI-but-not-merged. The displayed state never reconciled with GitHub's actual MERGED state — only gh pr view revealed the truth. This appears to be recurring.

Environment

  • Claude Code: 2.1.145
  • macOS: 26.5 (25F71)
  • node: v24.11.1
  • gh: 2.93.0
  • Repo config: GitHub squash-merge + auto-delete-branch; work done in a git worktree under .claude/worktrees/

Steps to reproduce (observed)

  1. Create a branch + PR from a worktree under .claude/worktrees/<name>.
  2. CI ("Check" workflow) goes green.
  3. PR is squash-merged on GitHub, which auto-deletes the remote branch (and the local worktree gets cleaned up).
  4. Observe the Claude Code UI's PR/CI status.

Expected

UI reflects PR = merged, and the deleted branch/worktree state is updated.

Actual

UI shows CI green but the PR as "not merged" (stale). The status never reconciles. Confirming true state required dropping to the GitHub API:

gh pr view 11620 --json state,mergedAt,mergeCommit
# state=MERGED  mergedAt=...  mergeCommit=aa2635b54d...

Impact

  • In-app PR/CI/merge status can't be trusted; user must use gh to learn the real state.
  • Compounded by squash-merge silently removing the session's worktree, leaving the UI pointing at a directory that no longer exists.

Notes

GitHub was the correct source of truth throughout (origin/main carried the squash commit). The discrepancy is purely the harness UI not polling/invalidating PR + worktree state after an external (queue/squash) merge.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗