Use case
A pull request reviewer that comments freely and merges never
Run Codex, Claude Code or your own agent as a pull request reviewer triggered by webhook, with scoped repository access, a budget and an audit trail of every comment.
A pull request reviewer runs often, reads a lot of untrusted text and holds credentials to your code. That combination is why it deserves more structure than a script with a personal access token.
How is it set up?
A fleet triggered by a webhook on pull request events. The connector permissions are narrow: read the repository, post review comments. Posting a comment is reversible, so it runs within policy. There is no merge permission to approve, because it was never granted.
What protects the repository?
- Narrow, short-lived credentials. The agent never holds your token. The gateway attaches a scoped credential for the run.
- A sandbox per agent. Code from the pull request runs in the reviewer's sandbox, not on a shared box.
- Effect classes. If you later allow it to push fixes, that can be gated by policy or by a person.
- A per-run cap. A huge diff cannot turn into a huge bill.
What is recorded?
Every comment, tool call and model call goes into the hash-chained audit trail, and each run ends with a receipt. If a review comment was wrong, you can see exactly what the agent read before it wrote it.
Updated
Questions
- Can the reviewer approve or merge pull requests?
- Only if your policy allows it. A typical setup lets it read code and post review comments, and gives it no merge permission at all.
- How is the reviewer triggered?
- By a webhook when a pull request opens or updates, or from Slack, the API or a chat in ChatGPT or Claude.
Related
- Approvals without rubber-stampingAsking a person to approve every agent action turns oversight into clicking yes. Effect classes, escrow and saved rules keep approvals rare and meaningful.
- Effect classAn effect class labels every agent action by how hard it is to undo: pure, reversible, compensatable or irreversible. Policy and approvals follow from it.
- An SEO agent that runs every week and cannot overspendRun Claude Code, Codex or Hermes as a scheduled SEO agent that opens pull requests for fixes, with a dollar cap and approval before anything merges.
- DevelopersThe hl CLI, TypeScript, Python and Go SDKs, the MCP connector for ChatGPT and Claude, and an agent-first API built on plan, quote and apply.