Repository navigation
Description
No related issue: found by the monitoring session during the #7912 canary.
Summary
Each work-resolve-issue run pushes to its own branch, work-resolve-issue/issue-<N>-<run_id>-1. When a run stops after pushing partial work, its branch stays. A re-run on the same issue makes a new branch and never touches the old one. The old work isn't reused, and the branch is never cleaned up.
Examples from the canary on 2026-10-18:
- discovery:research: require inline source links when the parent presents findings #7840: the stopped run 39089376952 left
work-resolve-issue/issue-7840-39089376952-1with no PR. Re-run 39092789214 opened feat(discovery): require inline source links when research findings are presented #7946 fromwork-resolve-issue/issue-7840-39092789214-1. - feat(session-flow): sweep and resume rate-limited agents in keep-going #7903: the stopped run 39090494185 left
work-resolve-issue/issue-7903-39090494185-1with no PR. Re-run 39092790956 opened feat(session-flow): sweep and resume rate-limited agents in keep-going #7947 fromwork-resolve-issue/issue-7903-39092790956-1.
Scale on 2026-10-18 at 03:2xZ: 44 work-resolve-issue/* branches exist, and 25 of them back an open PR. So 19 have no open PR. Some may belong to merged or closed PRs; this count doesn't separate them.
Fix
When a work-resolve-issue run starts on issue N, delete every older work-resolve-issue/issue-<N>-* branch that has no open PR. Deleting is preferred over reusing the old branch, because it has fewer moving parts and the re-run redoes the work anyway.
- Use the lane's existing token. Delete with
DELETE /repos/{owner}/{repo}/git/refs/heads/{branch}, one request at a time. - Never delete a branch that backs an open PR, or the run's own branch.
Verification
- A re-run on an issue with a stopped-run branch and no PR deletes that branch, and the new run's branch and PR are unaffected.
- A branch backing an open PR is kept.
- After the change ships, the count of
work-resolve-issue/*branches with no open PR stops growing.
Related
🤖 Generated with Claude Code
Activity
github-actions commentedon Oct 18, 2026
Proposed work class: work-class: scoped
Basis: automated intake triage; the lanes App applied this class.
Size: Small
Complexity: Medium
Uncertainty: Known
Flags: none
Blocked by: none
Newest recorded decision:
#7948 (comment)
That decision settles the open questions. I understood the request as follows. When a work-resolve-issue run starts, it deletes the issue's older stopped-run branches that have no pull request. It spares the run's own branch and any branch it reuses or resumes. The delete runs in a write-side step after issue-prior. Nothing is missing, and I found no duplicate among the open issues.
Automated triage, applied by the lanes App.
kyle-sexton commentedon Oct 19, 2026
Decision recorded.
Question: When a stopped lane run is re-run, should the new run reuse the stopped run's branch or delete it at the start?
Owner's answer (2026-10-19): "go w/ recommendations", which was: delete the stopped run's branch at the start of the re-run when that branch has no pull request. Keep it when a pull request exists.
melodic-automation-lanes commentedon Oct 29, 2026
Not admitted to the issue lane: a criterion names .github/workflows/work-resolve-issue.yml, which the issue lane cannot push (patch-protected-path); a builder session takes it. Admission takes the issue once each of those is met, when intake triages it again (
.github/actions/resolve-config/admission-rules.json).melodic-automation-lanes commentedon Oct 29, 2026
The latest triage verdict holds nothing: admission moved the issue to
status: confirmed; its comment says why.melodic-automation-lanes commentedon Oct 29, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: When a work-resolve-issue run starts on issue N, it deletes older lane branches for N that have no open PR, except any branch the lane itself reuses or resumes, and never its own branch.
Related work
Open questions
RECOMMENDED: Yes. Run the delete after the issue-prior step has picked reuse-branch or resume-branch, and spare that branch along with the run's own branch and any branch with an open PR. Basis: .base/.github/workflows/pr-run-activity-read.yml:880
RECOMMENDED: Add a small step in the write-side workflow, or a job that holds contents: write, that runs after issue-prior and deletes one branch per request with DELETE /repos/{owner}/{repo}/git/refs/heads/{branch}. Do not widen the read job's token. Basis: .base/.github/workflows/pr-run-activity-read.yml:895
RECOMMENDED: Follow the owner decision. Delete only a branch with no PR of any state, and leave closed or merged PR branches to the daily branch-cleanup job. Basis: https://github.com/fix(pr-pipeline): reuse or delete a stopped lane run's branch when the issue re-runs #7948#issuecomment-6271072430
RECOMMENDED: No. Leave the daily rule alone and make the start-of-run delete the only new path, so the two do not conflict. Basis: .base/docs/conventions/pr-pipeline/README.md:3231
Sources read
To answer, post a comment that starts with this line:
Automated refinement by the lanes App. Answer with a comment whose first line is
**Decision recorded.**.kyle-sexton commentedon Oct 30, 2026
Decision recorded. The refinement's four questions (#7948 (comment)) are settled on the evidence below, inside the owner's 2026-10-19 decision (#7948 (comment)): delete a stopped run's branch at the start of the re-run when it has no pull request, keep it when one exists. None of the answers changes that intent.
reuse-branchorresume-branchfrom earlier lane branches (.github/workflows/pr-run-activity-read.yml:878-898), andPick the lane branchtakes the reuse branch, else this run's own, else the resumed one (.github/workflows/work-resolve-issue.yml:588-591). Deleting the branch a run reuses or resumes would destroy the work the run is built on. So the delete runs after issue-prior has picked, and spares that branch.contents: write, after issue-prior, oneDELETE /repos/{owner}/{repo}/git/refs/heads/{branch}request at a time. The issue-prior step runs on the read-onlygithub.token(.github/workflows/pr-run-activity-read.yml:895), and it is not widened.docs/conventions/pr-pipeline/README.md:3231-3233). The start-of-run delete is the only new path, so the two rules do not conflict.Acceptance criteria:
.github/workflows/work-resolve-issue.ymljob or step that holdscontents: write, after issue-prior, one request per branch. The read job's token is not widened. (body, amended: the body's "lane's existing token, one request at a time", placed per question 2)Checks a person runs:
work-resolve-issue/*branches with no pull request stops growing. (body, unchanged: a measurement over time, so it is not a lane item)