MergeLoop

Configuration: .mergepatrol/mergepatrol.yml

Repo settings

Each repo sets its queue in .mergepatrol/mergepatrol.yml on its default branch. MergeLoop reads the file from there, so a PR cannot change its own settings. A setting the file leaves out takes the instance’s default: on a self-hosted MergeLoop, the MERGEPATROL_* variables in Environment variables.

version: 1
label: mergepatrol
batch_size: 8
agent:                  # the default model, which every task runs unless it overrides it
  provider: anthropic   # or openai
  model: claude-opus-5-5
  effort: medium        # low, medium, high, xhigh or max
  overrides:            # optional: a task's own model, over the default
    rebase:             # resolving a rebase's conflicts
      provider: openai
      model: gpt-6.1-sol
    fix:                # fixing failed checks
      model: claude-sonnet-5-5
    review:             # reviewing a PR, and answering questions about the review
      model: claude-fable-5-1
verify:
  - cargo check
fix_ci:
  enabled: true    # an agent fixes failed required checks
  attempts: 2      # 1 to 5 fixes, before the PR is ejected
branches:          # queues besides the default branch's: exact names
  - release
review:            # over the workspace's automatic review settings
  enabled: true
  bars:            # how sure the agent must be to send a change back to the author: 50 to 100, or always_ask
    security: always_ask
    dependencies: 95
  require_resolved: true   # wait for every review thread to be resolved

The agent runs Claude Code for Anthropic’s models, and Codex for OpenAI’s, with the workspace’s key for the provider from Settings. A workspace signed in to ChatGPT runs Codex on its plan instead of the OpenAI key. A file that sets another provider than the instance’s default must set its model too.

The agent has three tasks: resolving a rebase’s conflicts, fixing failed checks, and reviewing. Each runs the default model unless agent.overrides gives it its own. A task that sets another provider than the default’s must set its model too. The dashboard offers each provider’s current models by name; the file takes the model’s API id, and may name any model the provider serves. A file that still says resolver:, the section’s old name, reads as agent:.

The verify commands run after an agent resolution or fix, before the publish.

A fix runs in the sandbox, like a rebase, while the PR keeps its place at the head of the queue. It may change any file except those under .github/ and .mergepatrol/. The agent gets each failed check’s output and annotations, and for a GitHub Actions job, the end of its log. The log needs the App’s actions: read permission: an App created before this permission existed must be given it on GitHub, or the agent works from the output alone.

A repo queues once its default branch has the file. MergeLoop looks for it in every repo every 5 minutes, and at once when a push webhook adds or removes it. Turn on and Turn off in Repos override the file, until you choose Follow the config file.

The dashboard edits the file through PRs. Set up opens a PR that adds the file with the defaults, and the mergepatrol agent skill at .agents/skills/mergepatrol/SKILL.md and .claude/skills/mergepatrol/SKILL.md, so coding agents in the repo queue their PRs rather than merge them. Settings opens one that changes the file. Both come from the branch mergepatrol/config: a second change updates the open PR. The queue uses the new settings once the PR merges.

When the file does not parse, the queue pauses, and Repos shows why, until the file is fixed.

Docs