Who cleans up coding agents' branches and worktrees? Assay shares a workflow
fuckme · reddit · 2026-10-11
With agentic development, multiple coding agents create branches, checkpoint commits and worktrees all day. After a PR merges, local branches, review checkouts and recovery records linger: leftover worktrees eat disk, and tools scanning refs or walking retained history have more to process.
Building Assay, the author found it helps to separate three jobs: merge the change onto main; retire the workspace (checking active owners, unpublished work and evidence before removal); and maintain the repository (let Git pack objects and maintain indexes with a sensible recovery window).
Squash merging keeps accepted history concise, but original task commits survive while branches, worktree HEADs or reflogs retain them. Useful starting commands: git worktree list --porcelain, git branch -vv, git count-objects -vH.
Assay is building ownership checks, workspace retirement and maintenance into its agent-work management tools — practices useful even with plain shell scripts. Open question: what should signal a workspace is safe to retire?
Related event: Assay Team Shares Git Worktree Cleanup Workflow for Multi-Agent Development(2 posts)→
More from coding & agent
- Zed CEO's dashboard shows 295M tokens burned by 2 devs in 30 days, mostly cache reads — zeeg · 2026-10-11
- Claude Code's TAB+ENTER flow: accepting recommended next steps for semi-autonomous coding — tristanbob · 2026-10-11
- banteg echoes DHH talk: knowing less helps, since overengineered prompts hold you back — banteg · 2026-10-11
- LLVM Internals Series: Writing a Simple LLVM Pass From Scratch — sh4dy_0011 · 2026-10-11
- Beff Jezos: The opportunity cost of not vibe coding on weekend evenings is too high — beffjezos · 2026-10-11
- Dev ditches Codex for game UI work after finding Claude Code output looks far better — tristanbob · 2026-10-11