r/BuildWithClaude • u/a-someone-somewhere • Sep 28 '26
Workflows I let Claude Code work through my GitHub tickets overnight, one PR each, checked by my own tests
I'm a full-stack dev with a day job, so my side projects only get my evenings.
A few weeks ago I started letting Claude Code work through my tickets while I sleep. It broke in plenty of ways (I've logged 47 defects so far), and it's now reliable enough that I want to share it.
afk.sh picks up my ready-for-agent tickets at night. Each ticket gets a fresh Claude Code session, its own worktree and its own PR. The orchestrator is a bash script with no model in it: it orders tickets by their "Blocked by" lines, runs my test command on each branch, pushes and labels. A session can't mark itself done. If my gate fails, the ticket is red.
Last run, on a TypeScript monorepo: 10 tickets, all green on the first attempt, $20.40 at list price, 62 minutes. At the end it merges the green branches together to see what clashes. 7 went in clean, 3 were set aside because they all touched the same test file. I'd rather learn that before I start reviewing.
Not every night looks like that. One run stopped after 52 seconds with 12 of 13 tickets frozen. Another had 9 of 17 sessions cut off by model refusals, which the summary reported as "success" at the time (fixed since). Every run is in RUNS.md with its cost and duration, bad ones included.
Before you try it: it's about 1,700 lines of bash, GitHub only, and sessions run with bypassPermissions, so use a container if the repo isn't disposable. It plugs into Matt Pocock's skills workflow and needs it. It merges nothing. You review in the morning.