Ask Your Agent What Auto-Merge Merged, and Whether It Held Up
Auto-merge lets the coding agent's pull requests merge without a person when every check passes, they stay inside the hard rules and Cogny's merge review scores them at or above your threshold. Turning it on is the easy part. The question a week later is: what did it actually do, and was your policy right?
GitHub can't answer that for you. An auto-merge looks like any other merge there. So auto-merge's track record is now an MCP tool your own agent can read.
get_auto_merge_history
Ask in plain words, such as "How many PRs did auto-merge merge this weekend?" or "Show me everything it held this month", and your agent gets:
- Your current settings: on or off, the threshold, and the merge policy you wrote.
- Every decision in the period: merged, held by the review, held by the hard rules, or refused by GitHub. Each comes with the score, the threshold, a one-line summary and the reasons.
- Whether a decision was made under your current policy, so after you change the policy you can tell old decisions from new ones.
- Earlier decisions on the same pull request. A pull request held on Friday and merged on Saturday after a fix shows both.
- What happened after each merge: when GitHub merged it, how Cogny's evaluation of the ticket came out, and whether a later pull request reverted it.
The window defaults to the last 7 days and can cover up to 90.
update_auto_merge_settings
When the agent finds a pattern, for example "three good bug fixes were held because they touched a test helper", it can propose a new policy or threshold. An owner or admin signed in to the MCP connection can apply it with update_auto_merge_settings. The tool is marked as needing your confirmation: the agent shows you the old and new policy text and changes nothing until you say yes. A workspace API key can read the history but can't change the settings.
Bigger pull requests, stricter rules
Auto-merge now reviews pull requests of up to 30 files and 1,500 changed lines, up from 15 files and 400 lines, so a whole new integration fits in one review. With that come two rules no score can override. A pull request that adds a new dependency waits for a person, and so does one that adds code reading server secrets or starting other programs. Updating a package you already use still passes. What may merge on its own is still what your merge policy says.
Try it
Connect Cogny to your agent from your Cogny dashboard and ask: "What did auto-merge decide this week, and would you change my merge policy?"