Skip to main content
Back

Three Rules Before You Let AI Coding Agents Ship PRs

When an agent works on its own, your job becomes signing off. What it may start, what it must show, and what it may merge.

  • DeepSeek's November 2026 essay notes that a person can usually follow only 3 to 5 active sessions at once, which motivates splitting agents into a routing agent and single-task workers.
  • In a 2026 preprint of 359 people on logic puzzles, participants who consulted a wrong AI answer followed it 79.8% of the time, while access to the AI raised confidence by 11.7 percentage points, illustrating cognitive surrender.
  • A March 2026 METR note found that of 296 AI-written PRs reviewed by four maintainers, roughly 50% would not have been merged despite passing a coding benchmark's tests.
  • In a 2026 study of 23,247 agent PRs, mismatched description-code PRs were accepted only 28.3% of the time versus 80.0% for the rest, with most of the gap tied to GitHub Copilot PRs.
  • Anthropic's January 2026 trial of 52 junior engineers using an AI chat assistant to learn Python showed a quiz score of 50% versus 67% without the assistant, with the biggest gap in debugging.

AI coding agents used to wait for a prompt and stop when they finished. Some now watch a team's chat and its GitHub activity, start work on their own, and come back with a finished pull request.

That second kind is an always-on agent, and it raises one question: how much should it do before a person looks?

Your part then becomes sign-off, the step where a person accepts the finished work or sends it back. My read is that sign-off sets the limit, because research on how people handle AI answers points to it as the step where checking slips.

So write three rules before you let an agent run: what it may start without you, what it must show you when it finishes, and what it may merge.

None of this is far off. As of November 2026, Claude Code runs background sessions that a person dispatches, and on 1 November DeepSeek published a design for an agent that picks the work up itself.

Here is the path one request takes, and where each rule acts:

  1. A message arrives, and Rule 1 decides whether the agent may start.
  2. The agent finishes, and Rule 2 decides what it must show you.
  3. The change is ready, and Rule 3 decides whether it may merge.

Two short sections come first: what changes when agents run on their own, and why sign-off is where checking slips. Each rule then shows what DeepSeek's published code enforces, and a template for your own setup closes the piece.

What changes when a coding agent runs on its own?

Your job moves from doing the work to signing off on it. DeepSeek's November 2026 essay describes a design built around that move.

It splits the agent in two. A long-lived routing agent talks to people and hands out requests, and workers each take one task in a session of their own.

The reason is human attention. In DeepSeek's experience, "a person can usually follow only 3 to 5 active sessions at once."

You then talk to one agent instead of watching every session. The stated aim is to move people "from execution details to higher-level decisions and sign-off."

All of this comes as architectural ideas, and the code DeepSeek published is a research prototype, not an official product. Its essay also grants that many tasks still need a person partway through.

Two days later, on 3 November 2026, Addy Osmani, who works on Claude Code at Anthropic, described the same step from the reviewer's side. As models improve, Osmani writes, fewer outputs carry the obvious error that forces a second look.

And however many agents you run, "you still only have one pair of eyes on the outputs." When finished work piles up faster than you can read it (the essay adds) another session won't help.

At least in 2025, people handed off little. In Anthropic's study of 132 of its own engineers and researchers, with fieldwork in August 2025, more than half said they could fully delegate only 0 to 20% of their work.

What they did hand off was work that is easy to check, low stakes, or boring.

Take one case and keep it through the three rules. Your team's agent is connected to GitHub and the team chat, a teammate writes that the export button fails on an empty list, and the agent opens a fix.

Before that happens, three things need an owner: who decided it could start, what you'll read when it says it's done, and who merges it.

Why is sign-off where checking slips?

Sign-off is where checking slips because people who ask an AI and get a wrong answer usually take it, and they feel surer for having asked.

Two Wharton researchers call this cognitive surrender: adopting an AI's answer with little scrutiny, most of all when it arrives "fluently, confidently, or with minimal friction." And a finished PR with a tidy summary and green checks arrives that way.

In their first study (a 2026 preprint, 359 people, logic puzzles), the AI gave a wrong answer on random puzzles, and people who consulted it on those followed it 79.8% of the time. Yet access to the AI raised people's confidence by 11.7 percentage points.

Those were puzzles, though, and nobody in them reviewed code. Still, one condition moved the number: people paid per correct answer and told the result at once rejected the wrong answers they consulted 42.3% of the time, against 20.0% for people who got neither.

Rule 2 borrows that idea.

On real code, a March 2026 note from the AI evaluation group METR, which marks it as less reviewed than its papers, had four maintainers judge 296 AI-written PRs that all passed a coding benchmark's tests. Roughly half would not have been merged.

To be fair, reviewers do catch blatant failures. In a 2026 study of 23,247 agent PRs, PRs whose description plainly didn't match the code were accepted 28.3% of the time against 80.0% for the rest, and most of the gap came from GitHub Copilot's PRs.

So the blatant failure gets caught, and the subtle one is where the puzzle studies point. No study yet measures how people review subtle errors in agent-written code.

Then there are junior engineers. In an Anthropic trial published in January 2026, 52 mostly junior engineers learning a new Python library with an AI chat assistant scored 50% on the follow-up quiz against 67% without one, with the largest gap on debugging.

Anthropic's 2025 staff study names the bind: "supervising Claude requires the very coding skills that may atrophy from AI overuse."

The Wharton researchers add a fair counterpoint: cognitive surrender "is not inherently irrational" when the system is better. I agree, and it's why the rules below widen as an agent earns a record.

Rule 1: What may the agent start without you?

An always-on agent should start work only from people and sources you listed, under rules you wrote. And at first it should only record what it would have started.

Who and what can start work

Starting in record-only mode means the agent judges each incoming message, logs what it would have picked up, and does nothing. You read that log first.

Code is the right place for these rules, because a prompt leaves the call to the model. DeepSeek's own experiment shows why, with a timer standing in for real coding: a prompt told one agent to hand work to helpers and keep only small jobs.

In 1 of 5 runs it judged a job small and did it itself, and that run produced the experiment's slowest finishes.

So the design in DeepSeek's essay checks each message's source and sender in code, before any model sees it. And as of its October 2026 commit, DeepSeek's prototype goes further:

  • Record-only is the default for work nobody asked for.
  • Accepting such work takes at least one matching rule the team wrote.
  • The default list of people it acts for has one name.
  • Each accepted task gets a fixed record of its scope.

Even the prototype's routing agent keeps a shell with a 5-second limit, though, so its rule against doing the work is prompt text as well.

Unasked work is where the case for more freedom is strongest. DeepSeek says its internal agent opens fixes from public group chats when no one mentions it, but it publishes no acceptance figure, and each fix joins the queue waiting for sign-off.

What outside text can do

Starting work from outside text is also a security decision. Prompt injection is text that an agent reads and then follows as an instruction, and any issue or chat message can carry it.

Here, Simon Willison's lethal trifecta names the dangerous mix: private data, untrusted content, and a way to send data out. An always-on agent that reads issues, holds repo access, and can post or push has all three.

Two published demonstrations used ordinary GitHub text: a malicious issue that got an agent to copy private-repository data into a public PR (May 2025), and PR titles, issue text, and comments that hijacked three coding agents in GitHub Actions and leaked API keys (April 2026).

And DeepSeek's essay warns that if an injection compromises the agent's central loop, every connected machine could be taken over. So keep credentials out of the agent's reach.

One way is Anthropic's managed agents, which as of April 2026 hold tokens outside the sandbox where the agent's code runs. That stops token theft in Anthropic-hosted sandboxes.

But the approach doesn't stop an injected agent from using the credential, and it doesn't cover your own machine, where the prototype's docs advise a dedicated OS account for the agent alone.

For the export button

Your teammate described a bug and asked nobody to fix it, so in record-only mode the agent logs that it would have accepted and stops.

What to do: list who and which sources may start work, keep the agent in record-only mode until its log matches what you would have picked, and run it under its own OS account with only its own credentials.

Once the agent does start work, the next question is what it hands back.

Rule 2: What must the agent show you when it finishes?

Every finished change must come with evidence you can check before you read the agent's summary:

  • The command it ran and its output.
  • What its checks did not cover.
  • The decisions it made, such as the defaults it picked.

Why evidence comes before the summary

That matches the finish line in Addy Osmani's essay: "something tangible: a test passing, a screenshot, a log or trace." Its reading order is the command and its output first, then the summary.

But a green check proves only one property, and a test written with the same mistake as the feature still passes. If you can't say what the checks would miss, the Claude Code team's October 2026 advice is to ask for a real review.

I see the evidence rule as the per-answer consequence from the Wharton studies, moved to code, because a PR without its evidence goes back unread.

Here too, DeepSeek's prototype asks for that evidence in its prompts:

  • Each worker's final report separates finished work from an unfinished draft.
  • A team-edited file lists what every PR should carry.
  • The routing agent's note to a worker is capped at 30 words in code, and workers get a tool to read the original issue, so nobody works from a summary of a summary.

Can another model do the checking?

A second model can do part of it, but in a 2025 study of nine judge models and 39 models on benchmark questions, judges scored models similar to themselves higher (average correlation 0.84).

There is a fair case for trusting models more. Addy Osmani argues for pushing more detection to agents, and DeepSeek's essay has a model judge whether each worker is drifting, with no published measurement.

I'd still keep one check per change that isn't a model's opinion, such as a test you can run or a trace you can read.

For the export button

That means a PR with the test command and its output. It also lists what wasn't tested and the default chosen for an empty list.

What to do: put the three items in your PR template, send back any agent PR that arrives without them, and keep at least one check per change that isn't a model's opinion.

With the evidence in hand, the last rule decides who presses merge.

Rule 3: What may the agent merge?

The agent may merge nothing under its own account, and only what your branch protection already allows without a person.

Branch protection is GitHub's set of rules on a branch: how many approvals a PR needs, which checks must pass, and whether new commits cancel old approvals. GitHub enforces it whatever the agent's prompt says.

Why the rule belongs in branch protection

As of its October 2026 commit, DeepSeek's prototype draws the same line:

  • Its code has no merge logic.
  • By default the agent never turns on automatic merging under its own account, because GitHub records a merge under whoever enabled it.
  • Its merge limits (fewer than 200 changed lines, approvals that cover the latest commit) are prompt text.

That's why its docs tell you to require approvals in branch protection and let "people merge until the agent's pull requests have been right for a while."

And a two-line change to a permission check passes any line limit and is still risky, so auth, billing, and release paths stay with a person at any size.

On GitHub, a CODEOWNERS file (which names who must review each path) plus required code-owner review does that.

Also read the default prompts before you grant push rights. The prototype's default has the worker rewrite branch history with git filter-branch and git push --force-with-lease to credit reviewers.

Then widen the rule on evidence, as maintainers already do. Acceptance of agent performance fixes rose from the 31 to 37% range to 70% with the agent's track record in that repository, in a September 2026 study of agent fixes meant to make code faster.

For the export button

The fix is small and easy to check, so it is a fair first candidate. Until the agent has a record on your repo, a person still merges it.

What to do: turn on branch protection with required approvals, add a CODEOWNERS entry for auth, billing, and release paths, and keep merges with a person until the agent has a record on your repo.

Those three rules fit in four lines.

How do you write your three rules?

Write one line for each rule, plus a limit on how much finished work may wait for you.

May start:      [who and which sources], under [which written rules], record-only until [condition]
Must show:      [command and output], [what was not tested], [decisions made]
May merge:      [what branch protection allows], never as the agent's account, [paths that always need a person]
Sign-off limit: no more than [N] finished changes waiting, or the agent pauses new work

Filled in for the export-button team, it could read like this.

May start:      our five engineers, in chat and on issues. Unasked work only for one-module bug fixes. Record-only until its log matches our picks.
Must show:      test command and output, what was not tested, each default chosen.
May merge:      nothing yet. Later, small fixes with one approval, never auth, billing, or release paths.
Sign-off limit: five finished changes waiting, then no new work.

That last line is the one I'd write first. When finished changes pile up faster than you can read them, the agent stops taking new work until the queue drains.

My read is to give an agent no more freedom than your sign-off can keep up with, and to widen it only when its record on your repo says you can.

Questions?

How much should I let an AI coding agent do without review?

Let an AI coding agent do only as much as your sign-off can keep up with. Start it in record-only mode on work from listed people, require evidence with every finished change, and keep merges with people. Widen that once the agent has a track record on your repository and the change is easy to check and low stakes.

What should an AI agent include in a pull request description?

An AI agent's pull request description should carry the command it ran and its output, what its checks did not cover, and the decisions it made. Read that evidence before the summary. In a 2026 survey of 239 practitioners, 23.8% said tests were enough evidence to approve an AI-written pull request, against 41.0% for a human one.

Should an AI agent be allowed to merge its own pull requests?

An AI agent should not merge under its own account, and at first it should not merge at all. Put the merge rule in GitHub branch protection, not in the agent's prompt, and keep auth, billing, and release paths with a person. DeepSeek's prototype docs advise that people merge until the agent's pull requests have been right for a while.

What is cognitive surrender in AI-assisted coding?

Cognitive surrender is adopting an AI's answer with little scrutiny, a term from two Wharton researchers. In the first study of their 2026 preprint, which used logic puzzles, people who consulted an AI that was wrong followed it 79.8% of the time. No study has measured it on code review yet, so treat it as a risk to design against.