Evaluation

Agent Merge Queue Review

Separate useful agent output from merge-shaped confetti.

Use when

Agent throughput created more branches than a human can safely review from memory.

difficultyAdvanced
categoryEvaluation
sourceAdapted from public Claude Code and agent-orchestration discussions

Cadence

After multiple agent-generated PRs or branches accumulate

Verification

Only branches with passing checks, clear intent, non-conflicting scope, and human-readable evidence are merged or promoted.

Structured loop spec

FieldValue
NameAgent Merge Queue Review
CategoryEvaluation
TriggerAfter multiple agent-generated PRs or branches accumulate
ObjectiveSeparate useful agent output from merge-shaped confetti.
Allowed inputsRelevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop
Allowed actionsList all candidate PRs/branches with goal, touched files, test evidence, risk, and age.; Group related branches and identify conflicts, duplicated work, and dependency ordering.; Run targeted checks for the highest-value candidates first.; Approve, request changes, merge, park, or close each candidate with a reason.; Update repo instructions or loop docs with any recurring failure pattern seen across branches.
VerificationOnly branches with passing checks, clear intent, non-conflicting scope, and human-readable evidence are merged or promoted.
Stop conditionStop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.
BudgetSet a time, turn, token, retry, file, or dollar cap before running the loop.
Approval boundaryHuman approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.
Safe outputDraft, report, checklist, table, or approval-gated recommendation
Works withClaude, ChatGPT, Gemini, any tool-using AI assistant

Steps

  1. List all candidate PRs/branches with goal, touched files, test evidence, risk, and age.
  2. Group related branches and identify conflicts, duplicated work, and dependency ordering.
  3. Run targeted checks for the highest-value candidates first.
  4. Approve, request changes, merge, park, or close each candidate with a reason.
  5. Update repo instructions or loop docs with any recurring failure pattern seen across branches.

Prompt

Run the Agent Merge Queue Review loop. Inventory candidate PRs or branches with goal, touched files, verification evidence, risk, and age. Group related work, find conflicts and duplicated abstractions, run targeted checks for the highest-value candidates, and decide approve/request-changes/merge/park/close with reasons. Capture recurring agent failure patterns in repo instructions or loop docs.

Run in Claude Code

Paste this into Claude Code (or any tool-using agent) to run the loop bounded: one change per round, the same verification every round, durable state files, and explicit stop conditions.

Run the "Agent Merge Queue Review" loop from AI Loop Library (https://ailooplibrary.com/loops/agent-merge-queue-review/) as a bounded loop.
Goal: Separate useful agent output from merge-shaped confetti.
Rules: one change per round; run the same verification every round (Only branches with passing checks, clear intent, non-conflicting scope, and human-readable evidence are merged or promoted.); append each round to docs/loops/agent-merge-queue-review/progress.md and update docs/loops/agent-merge-queue-review/state.json; stop on verifier pass, 8 rounds, 3 consecutive failed verifications, no progress, a blocker, or anything needing human approval (money, production, outbound, deletion). Finish with a proof report: rounds used, changes made, verification output, remaining risk, and the next human decision.

Get the MCP server + agent pack

Tags

PR reviewmerge queueagent branchesintegration

Related loops

Browse all 68 loops