Work a ranked GitHub issue queue with background Claude Code sessions

Jamie Duncan's Factory has a local model score open GitHub issues, then runs Claude Code on a home NUC to fix the top one, wait for CI and merge before taking the next.

Done withClaude CodeinGitHub· Nov 20, 2026

What they did

Jamie Duncan builds BrandCast, a large monorepo, and moved his Claude Code setup off his laptop onto an Intel NUC with 32GB of RAM. He wrote a small web app called Factory that pulls every open GitHub issue and sends it to a local model on a separate home inference box, which scores each one for complexity, impact and feasibility and writes a short rationale. Factory shows the top 15. He can run one by hand, or start auto mode: Factory starts a background Claude Code session in a fresh git worktree with his skills, MCP servers and prompts, the agent plans, edits, tests and opens a PR, and Factory polls GitHub Actions. Once the PR passes and merges, it removes the worktree, cleans up processes and branches, logs the run to SQLite and starts the next issue.

How it went

Duncan says the loop runs on its own and keeps his laptop free for research and design work. The one figure he gives is a single issue that took 151 minutes from start to merge. Scoring the backlog costs nothing in API tokens because it runs locally. He gives no count of issues closed, failure rate or token spend on the Claude side beyond being on a Max plan.

Worth knowing

He says it only works because his own framework forces tests and checks before any commit; without those, an unattended loop just piles up bad code. Every run gets its own worktree so a failed one can be thrown away. The local model only ranks issues; all code changes go through the frontier model.

Try it

With Claude Code· 5 parts to fill in

Act as the worker for my issue queue in [repository]. Take the highest-ranked open issue from [queue file or label]. Create a new git worktree and branch for it, read the issue and its acceptance criteria, write a short plan, make the change and run [test command] until it passes. Open a pull request that links the issue. Then watch the CI run: if it fails, fix it and push again, at most [number] times. When the PR is green, stop and tell me the PR link, the time taken and anything you were unsure about. Do not merge unless [merge rule], and remove the worktree once the PR is merged or abandoned.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related