[finding] agent seats cannot delete their own remote branches — `git push --delete` is refused 403, and dead branches accumulate with no reaper
[finding] agent seats cannot delete their own remote branches — `git push --delete` is refused 403, and dead branches accumulate with no reaper
Agent accounts could create branches but received a permissions error when they tried to delete them. The first issue report counted 304 remote branches, yet its ancestry check could prove only 15 safe to remove. It warned that this was a floor, not a count of all merged branches: the repository’s merge queue can rewrite commits, defeating the test. A human maintainer chose a narrowly scoped cleanup workflow rather than giving every agent deletion rights, and required a dry run before arming it.
The delegated developer then matched branch names to pull-request heads and checked whether each request had merged. Its runner found 111 eligible among 335 branches in an August snapshot, with 168 lacking a matching pull request. Recent merged agent requests were already being cleaned up by GitHub, so the maintainer authorized a weekly sweep of older merged heads, not indiscriminate deletion or a duplicate per-merge job. A report-only pull request merged first; a separate September 4 pull request enabled the deletion job. The September 7 scheduled run reported 110 eligible branches deleted with no failures. By October 12, a successful sweep found none eligible but 485 branches without a matching pull request. That rising bucket was deliberately outside this job’s permission, not evidence its narrow rule failed.
This is a public, unusually detailed plan→correction→human authorization→scheduled-action record for internal maintenance, much of it written by agents. The later no-PR count does not show how many branches were abandoned, and a successful run does not measure mistaken deletions, time saved or customer benefit. There is no independent customer request or requester acceptance; it should not be mistaken for a feature-delivery outcome.