Issue-to-PR Agent
Label a GitHub issue before bed. Wake up to a draft pull request that builds.
Picks up issues you mark as ready, implements each one in an isolated branch with Claude Code, runs your build, and opens a draft PR for you to review.
- 02:00:00start3 issues labeled agent-ready
- 02:00:04branch#142 → agent/issue-142
- 02:11:37claude6 files changed
- 02:12:58gatenpm run build · passed
- 02:13:06prdraft PR opened → dev
- 02:13:07issue#142 agent-done
The problem
Small tasks pile up in every backlog: a copy fix, a layout bug, a missing field. Each one takes half an hour you never have, so they sit there for months.
How it works
- 1
Pick up
On a schedule, it collects open issues labeled agent-ready and moves them to agent-in-progress, so nothing gets picked up twice.
- 2
Isolate
Every issue gets its own git worktree and branch. Your main checkout, and anything you are working on, stays untouched.
- 3
Build
Headless Claude Code implements the issue from its description. For UI work it can take browser screenshots to check its own result.
- 4
Gate
Your build has to pass. If it fails, the issue gets agent-failed and a comment with the end of the build log, so you see why.
- 5
Hand off
It pushes the branch, opens a draft PR against your dev branch, and links it on the issue. You review and merge.
What you get
- Label workflow: ready, in progress, done, failed
- Scheduled runner with a lock against overlapping runs
- Build gate adapted to your stack
- Optional visual check with headless browser screenshots
- Desktop notifications and a log for every run
What you need
- A GitHub repository and the gh command line tool
- A Claude plan with Claude Code
- A project with a build or test command
- A Mac or server that can run scheduled jobs
Built-in safety
- Never touches main and never force-pushes
- Draft PRs only: a human always merges
- Nothing is pushed unless the build passes
- A cap on issues per run, so one night cannot run away
Ships real fixes on dnevniktrudnoce.com, a live product I run.
Questions
Will it break my project?
It cannot merge anything. Work happens on separate branches, and only drafts that pass your build reach you. You decide what gets merged.
What kind of issues work best?
Clear, small-to-medium tasks with a described result: UI fixes, copy changes, new fields, small features. Vague or architectural issues are better kept for humans.
Does it work with my stack?
If your project builds from the command line, yes. I have run it on Angular and Node projects; the gate is adjusted to your build and tests during setup.
Other automations
Have a task that repeats every week?
Tell me about it. If it can be automated well, I will show you how. If it cannot, I will say that too.
Request this automation