Issue-to-Merge GitHub-Native Loop (Engineer the Reload)

A full-lifecycle loop where every piece of workflow state lives in GitHub — issues, labels, PR comments — and repo files, so each cold-start session rehydrates from GitHub rather than a conversation. Built on the official claude-code-action.

prompt
→ Claude
Run Claude Code across the full lifecycle — issue intake → branch → implement → PR → review fixes → merge — with ALL workflow state externalized to GitHub (issues, labels, PR comments) and repo files. Each session starts cold and rehydrates from GitHub state; "the chat being gone doesn't cost you anything."
claude-code

Implementation note

When to use: you want an agent operating across the full delivery lifecycle — issue intake, branch, implement, PR, review fixes, merge — reliably enough that losing a session costs nothing. How it works: Claude Code runs the whole flow with all workflow state externalized to GitHub — issues, labels, PR comments — and repo files, built on the official claude-code-action. Each session starts cold and rehydrates entirely from GitHub state, which is the engineer-the-reload idea: the chat being gone doesn't cost you anything, because nothing important ever lived only in the conversation. Safety: externalized state is itself a rail — every decision and status change is visible in GitHub's audit surfaces (issue timelines, PR history) rather than an opaque transcript. The lifecycle includes merge, so govern that step with branch protection, required checks, and human approval; let the agent drive the process while the merge gate stays policy-controlled.

Source: Saulius (saulius.io)

More ci loops

Ship a PR through CI and reviews

/loopnew

Draft a PR, run CI, collect reviews, merge, and release—repeat every 30 minutes until land criteria are met.

prompt
→ Claude
/loop 30m /flow-next:land # ship loop: draft PR → CI green → reviews converged → merged → released
cihigh risk

Watch PR checks pass

/loopnew

Poll GitHub PR checks every 5 minutes until all status checks pass.

prompt
→ Claude
/loop 5m gh pr checks 1234
cilow risk

Wait for CI so you don't have to

/loopnew

Poll gh pr checks every 10 minutes and get told when the PR is ready to merge, or a summary of which checks failed and why.

prompt
→ Claude
/loop 10m run `gh pr checks 1234`; if all pass, tell me it's ready to merge; if any fail, summarize which and why
cilow risk