Extend the --delete-branch camping rule to gh pr close #340
No reviewers
Labels
No labels
4-29
bug
documentation
duplicate
enhancement
flow improvement
good first issue
help wanted
invalid
investigating
issue-agent
issue-agent-blocked
issue-agent-complete
issue-agent-pr-open
issue-agent-runner-nelsonlaptop
issue-agent-runner-nelsonpc
issue-agent-runner-nelsonpc-user
issue-agent-running
needs-verification
next to do
question
queue
recon
relics-stats-onboarding
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/spirelens!340
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/delete-branch-flag-on-close"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The doc forbids
-dongh pr mergeand explains why, but the camping is theflag's local half, which is not specific to
merge.Observed on throwaway PR #339:
gh pr close 339 --delete-branch, run from theworktree sitting on that branch, printed
Deleted branch claude/ci-gate-probe and switched to branch mainand left theworktree camping on
mainexactly asmerge -ddoes.The remote half is where
closediffers, so the existing fix does nottransfer.
delete_branch_on_mergefires only on a merge, so a closed-unmergedPR's remote branch survives — confirmed against three closed PRs
(
claude/sad-napier-14962f,claude/save-state-on-death-b0ebe8,codex/keep-camera-in-capture) whose remote branches are all still live. So"do not pass the flag" would leak the remote branch here, and the cleanup needs
both halves spelled out:
Docs only — no code paths touched.