PRACTITIONERCHAPTER 11

Managing a team that works with AI coding agents

Every engineer on your team can now draft code faster than your reviewers can read it. You own the working agreement, the review capacity and the accountability that stop that from becoming incidents

40 MINENGINEERING MANAGERUPDATED 2026-11-21
PREDICT

Your team of eight adopts coding agents and each engineer starts merging noticeably more changes. Which part of your delivery process most often becomes the constraint first?

You manage one team and its engineers now have a tool that drafts code in minutes. Which tools to license, what they cost, what to tell the board and whether to change the hiring plan belong to your head of engineering, and AI and the engineering organisation covers them. The technique of working with an agent belongs to the engineers: the Building Software with AI Agents course teaches briefing, verifying and reviewing, and this chapter does not repeat it. Yours is the part in between. What does your team agree to do, who reads what, who answers for it, and how do you tell whether any of it is working?

The model: the author owns the change

Two failures show up in the first months, and they are opposites.

The first is the manager who leaves it to individuals. Each engineer finds their own way of working with an agent. One briefs it carefully and reads every line. Another accepts what it produces after a skim. Reviewers cannot tell which kind of change they are looking at, so they treat all of them the same, and the quality of what reaches production depends on the habits of whoever wrote it.

The second is the manager who mandates a speed. Leadership has announced that the tools make engineers faster, so you begin asking why a team is not producing more. Engineers hear the question as a target. Changes get larger, reviews get shorter, and the number you were watching improves while incidents rise.

The way between them is one rule and a short agreement. The rule: whoever merges a change owns it, however it was written. An agent is a tool. It carries no accountability, cannot be paged and will not be in the postmortem. If an engineer cannot explain a change and defend its tests, they are not ready to ask for review. The agreement is how the team makes that rule practical: what may be delegated, how big a change may be, what the author checks before asking, what the reviewer may expect, and what is disclosed.

Decision Who decides Your job
How an engineer briefs and steers an agent The engineer Stay out. Technique is personal and changes every few months.
Whether a change is ready to merge The author, then the reviewer Make sure the review is real: time to do it, and no pressure to approve fast.
What the team agrees about size, evidence and disclosure The team, written down and owned by you Draft it with them, keep it to a page, review it each quarter.
What data may enter a prompt, and which tools are approved The company’s policy, from your head of engineering and security Know it, translate it into the agreement, report breaches upward.
How much of the quarter goes on review, tests and tooling that make agents safe to use You, negotiated with the PM Price it and defend it, as technical decisions as a manager does for debt.

What the evidence supports

You will be asked what the tools are worth, and you will hear numbers from vendors, from surveys and from your own enthusiastic engineers. Three rules keep you honest.

A figure needs its source and its caveat. METR’s trial is the clearest design: random assignment of tasks, real work, experienced developers. Its result, about 19% longer with AI allowed, applies to those sixteen developers, on their own mature repositories, with the early-2025 tools. METR lists claims the study does not support, including that AI does not speed up most developers, and has since changed its experiment design because of selection effects. Quote it with all of that, or do not quote it. The same rule applies to a figure in the other direction. Quote a speed-up only with its design, its sample and what it measured.

Feeling fast is not being fast. In METR’s trial the developers were wrong about the direction of the effect. A survey of how your engineers feel measures satisfaction, which matters, and does not measure delivery. Ask your team how it feels, and also measure what you already measure.

The tools amplify what is already there. The 2025 report from DORA, the research programme behind the delivery measures many teams use, describes AI as an amplifier: it magnifies the strengths of organisations that deliver well and the weaknesses of those that do not. Its companion AI Capabilities Model lists practices that make the tools pay off, among them a clear AI policy and working in small batches. Both rest on surveys, and survey data shows associations, not causes. For you the implication is practical. If your review queue is slow, your changes are large and your pipeline is fragile, expect the tools to make each of those worse, and fix them first.

This chapter gives no productivity figure for the tools, and neither should you, to your manager or to your team.

Output is not the measure

Sooner or later one engineer’s numbers will stand out. Akpevwe merges three times as many changes as the team median, and her changes are linked to twice as many incidents. A leader who sees only the first number wants everyone to copy her. A leader who sees only the second wants her to slow down.

Both are reading counts. With an agent, a change is cheap to produce, so the number of changes says little about value. A count of incidents says little about quality unless you also know how much was shipped, how risky it was and who found the fault. Goodhart’s law applies: once a count becomes a target, it stops measuring anything. Start with the changes and the incidents themselves, and ask four questions.

  • What did the changes do? Three times the changes could be three times the features, or one feature split into more pieces.
  • What did review cost? If each of her changes takes a reviewer longer, the team’s cost may rise even as her count does.
  • What were the incidents? Was the fault in code she changed deliberately, or in something the agent altered that she did not read? A risky choice and a skipped step need different responses.
  • What do the rates look like? Illustrative numbers: if her four incidents come from 54 changes and the median engineer’s two from 18, her rate is lower, about 0.07 per change against 0.11, while her total harm to the team is higher. Both are true, and neither is a verdict.

Delivery is a team outcome, and the team measures to use are the ones you already report. DORA’s software delivery measures group into throughput and instability, and the delivery metrics and reporting chapter shows how to use them without turning them into targets. Add the ones the tools affect: the wait for a first review, change size, rework within two weeks of a merge, and incidents traced to a recent change. Put counts beside rates, and report a range by team and not a headline percentage.

A promotion packet or a performance review that rewards volume teaches the whole team to produce volume. Performance management covers how to judge impact, and nothing in it changes because an agent typed the code.

The team working agreement

Write the agreement before the first incident, not after. It fits on one page, it lives in the repository next to the code, and it names an owner (you) and a review date. The company’s AI policy sits above it and sets what is allowed at all. The agreement sets how this team works inside that policy. Its sections:

  1. What may be delegated, and what may not. A list of the kinds of work an agent may do without special care (tests, boilerplate, mechanical refactors) and the kinds that need an extra person (payment or billing logic, access control, data deletion, anything that changes what customers are sent). Choose by blast radius, not by difficulty.
  2. What never enters a prompt. Taken from company policy and written in the team’s words: secrets, customer data, anything under a contract that forbids it. The agreement says where the policy lives and who to ask.
  3. Change size. A ceiling on the size of a change submitted for review, chosen by the team. Google’s public code review guidance says reviewers may reject a change for size alone, and gives about 100 lines as usually reasonable and 1,000 as usually too large, a judgement it leaves to the reviewer. Its guidance predates agents, which make large changes easy to produce, so the ceiling matters more now, not less. Whatever number your team picks is a team choice, not a standard.
  4. What the author checks before asking for review. The author has read the whole diff, run the tests, and can say in the description what the change does and what was checked. Generated tests that only restate the code do not count.
  5. Disclosure. Say in the pull request when an agent wrote a substantial part. The purpose is not to confess. It tells the reviewer where to read more slowly, and it lets you see the pattern later.
  6. Review expectations. What a reviewer may ask for (an explanation, a smaller change, a test that fails without the fix) and what a reviewer may refuse to approve. Include the right to say that a change is too large to review.
  7. Instruction files. Where the shared agent instructions live and who maintains them. The AGENTS.md format is plain Markdown, with no required fields, kept beside the code; the file’s contents are part of your codebase and deserve review like any other.
  8. Incidents. How an incident involving agent-written code is reviewed (the same blameless way as any other) and when the agreement changes as a result.
  9. Review date. The tools change quarterly. An agreement nobody revisits goes out of date within a year.

Draft it with the team in one meeting, so that it is theirs. The engineers who use agents most heavily will tell you what is unworkable. The sceptics will tell you what is missing.

Review is where the work moves

When drafting is cheap, review becomes the scarce resource, and your reviewers are the people you can least afford to lose. Three things go wrong.

The queue grows. Changes arrive faster and larger. Review waits stretch, authors start the next change before the last is reviewed, and work in progress rises. Delivery and planning covers why: the cheapest way to finish things sooner is to start fewer at once.

Review becomes a formality. A large diff from an author who did not write it, reviewed by someone who has twenty others waiting, gets a skim and an approval. Google’s guidance says a reviewer should approve a change once it definitely improves the health of the codebase. That is a standard of judgement, and it needs time to apply. If reviewers cannot spend time, the standard is not being met, whatever the approval record says.

Review time is invisible. No dashboard shows a reviewer’s afternoon. Your planning does not budget it, and people who review a lot look slower than people who do not. Put review into your capacity plan, count it in 1:1s and in promotion cases, and say out loud that reviewing is work.

What helps is mostly old advice made firmer. Cap change size. Require the author to describe what they checked. Allow the reviewer to send back a change as too large. Measure first-review wait weekly and watch for a rise. Spread review across more people, which also teaches them the code. Where the cost of a mistake is high, require a second reviewer, and say so in the agreement.

Accountability, incidents and blame

When a change an agent wrote causes an incident, the temptation is to blame the tool, or the engineer who accepted what it produced. Neither helps. The tool cannot learn from a postmortem, and a blamed engineer stops telling you what happened. On-call and incidents for managers explains why blamelessness is the manager’s behaviour and not a template, and it applies here without change.

The useful questions are about the system. Was the change within the size the agreement allows? Did the author check what the agreement says they should? What did the reviewer see, and how long did they have? Was the failure in a part of the code that should have needed a second reviewer? Did the tests cover the behaviour that broke, or only restate the code? The answer becomes an action: a change to the agreement, a test, a smaller ceiling, a new class of work that needs a second pair of eyes.

Accountability stays with people, privately. If an engineer repeatedly merges changes they have not read, after the team has agreed they must, that is a performance conversation and it belongs in a 1:1, not in the postmortem. The rule from earlier applies: whoever merges owns the change.

Juniors and how people learn

Engineers at the start of their careers learn by writing code, getting it wrong and having it reviewed. If an agent writes the first draft, some of that learning moves or goes missing. Practitioners disagree about how much that matters, and the evidence is thin. Be wary of anyone who gives you a confident figure.

What you can do is make learning deliberate. Ask a junior engineer to explain a change in their own words in the review. Pair them with a reviewer who reads for understanding and not only for defects, and give them some work to do without the agent, chosen to teach the part of the system they need. Do not rate them on volume. In 1:1s, ask what they did not understand this week; one-on-ones and feedback covers how to ask. Senior engineers are affected too: their work shifts towards review and specification, which shows slowly, so make it visible in their promotion cases.

Where practitioners disagree

Mandate or permit. Some leaders require every engineer to use agents and set usage targets. Others make the tools available and leave the choice. The first risks counting usage and not value. The second risks wasted licences and a team split into those who use agents and those who do not. Most managers do best by permitting, supporting and measuring outcomes, and by treating a refusal as information to ask about.

Disclose or not. Some teams label agent-written changes and some say the label is meaningless when everyone uses agents all day. The case for labelling is that reviewers calibrate their attention. The case against is that it becomes noise once nearly everything is assisted. A common middle path is to disclose when an agent produced most of a change, and to review the label’s usefulness each quarter.

Individual measures or team measures. Per-person numbers are easy to produce and easy to misuse. Team-level measures hide a struggling engineer for longer. A defensible compromise is to look at individuals through their work, in review and 1:1s, and to report numbers only for the team.

Day to day

Every pull request you read. Check whether the description says what was checked, and whether the size is within the agreement. A small word in a review, such as thanks for splitting this, costs nothing and reinforces the norm.

Weekly, fifteen minutes: the review queue. Look at the first-review wait, the oldest open change, and the biggest merged change. Ask the team what they are stuck on. This meeting is where review problems are caught before they become incidents.

In 1:1s. Ask how working with the agent has gone this week, what it got wrong, and whether they felt pressure to approve something they did not fully understand. Listen for the engineer who is quietly reviewing too much.

In planning. Take the review and test-maintenance capacity off the top before committing feature work, and say what you assumed. Delivery and planning shows the arithmetic.

Monthly. Send your manager the numbers you can defend, with counts, and say what you cannot yet measure.

After an incident. Ask the system questions above. Update the agreement if the answer calls for it.

Quarterly: the agreement review. Revisit the working agreement with the team. Remove what nobody follows, add what incidents and reviews showed was missing, and update it for the tools that have changed.

In a normal week this costs an hour or two.

BY ORG SIZE
STARTUPunder 30 people

Under thirty people there is rarely a policy, a security lead or a review process, and the engineers who adopt agents first set the habits. Write one page and keep it in the repository: what may not go into a prompt, the largest change a person will review, and that the person who merges owns the change. Pair on anything touching money or customer data. The founders’ own use sets the standard, so if they merge agent output unread, the page will not matter. Review the page when something breaks.

SCALE-UP30 to 300

Between thirty and three hundred people the teams diverge. One team reads every line, another does not, and a company policy may exist but is not yet translated into daily practice. This is where the team working agreement earns its place: a shared baseline from engineering leadership, and a team-level agreement under it that the manager owns. Compare review waits and incidents across teams, with counts, to find which agreement is working. Raise a gap in the shared tooling, such as slow continuous integration, with your head of engineering and not alone.

ENTERPRISE300 and up

At three hundred people and up, procurement, legal and security decide which tools are approved, and the tools may differ between business units. Your constraints come from outside: approved models, retention terms, audit requirements, and in some sectors regulators. Your agreement becomes a translation layer between that policy and daily work, with evidence the team can show an auditor. Review capacity is often owned by a central platform or quality function, so bring numbers when you ask for it. Expect a long gap between a team finding something and the policy changing.

ARTEFACT Write a team working agreement for AI-written code ~60 MIN
YOU PRODUCEA one-page working agreement for one team, with a review date

Template

# <Team> working agreement for AI-written code
Owner (EM) · Agreed with: <engineers> · Company policy: <link, owner> · Next review: <date>

## The rule
Whoever merges a change owns it, however it was written.

## What may be delegated
- Without special care: <e.g. tests, boilerplate, mechanical refactors>
- Needs a second reviewer: <e.g. billing, access control, deletion, customer sends>
- Not delegated: <list, or none>

## What never enters a prompt
<From company policy, in the team's words.> Ask <person> if unsure.

## Change size
No change over <n> changed lines (excluding generated files) goes to review. <n> is the team's choice from <date>.

## Before you ask for review
- I have read the whole diff.
- The tests were run, and at least one fails without the change.
- The description says what the change does and what I checked.
- An agent wrote most of this: <yes/no>.

## Reviewers may
Ask for an explanation, a smaller change or a test; send back a change as too large; take the time the review needs.

## Shared instructions
Agent instruction file: <path>. Maintained by <person>. Changes to it are reviewed like code.

## Incidents
Reviewed blamelessly. The questions: <size, checks, what the reviewer saw, tests, class of work>.

## What we watch (team level, with counts)
First-review wait · change size · rework within two weeks · incidents traced to a recent change

## Review
Every quarter, and after any incident that points at this page.
WORKED EXAMPLE

Wrenpost is the messaging API company in Lagos, with 55 engineers in seven teams. Seigha manages Delivery Reports, eight engineers. The company’s AI policy was signed on 1 October 2026, and the team agreement sits under it. This is the page Seigha agreed with the team in the first week of November.

The rule. Whoever merges a change owns it, however it was written.

Delegated. Tests, boilerplate and mechanical refactors without special care. Anything that changes what a customer is sent, how a delivery report is signed or when a webhook is retried needs a second reviewer. Nothing is wholly off limits.

Prompts. Message bodies, phone numbers and secrets never go into a prompt, per the company policy; ask the security lead if unsure.

Size. No change over 400 changed lines, excluding generated files, goes to review. The team chose 400 on 4 November; it is a team choice, not a standard.

Before review. The author has read the whole diff, run the tests, and described what was checked. At least one test fails without the change.

Disclosure. The pull request says when an agent wrote most of the change.

Incidents. Reviewed blamelessly, using the questions on size, checks, what the reviewer saw and whether the tests covered the behaviour that broke.

Watched, team level. First-review wait, change size, rework within two weeks and incidents traced to a recent change, with counts. The first reading is the baseline.

Next review: 3 February 2027, and after any incident that points at the page.

Now you

You manage Routing at Wrenpost: eight engineers who own the carrier integrations, the oldest code in the company. Wrenpost’s AI policy was signed on 1 October 2026, but Routing has no working agreement. About half the team uses agents daily and two engineers never do. Over six weeks the median wait for a first review rose from 6 to 11 hours. One engineer’s changes now average about 900 changed lines. Two incidents in the period were traced to recent changes, and one reviewer told you in a 1:1 that she approved a change she had not fully understood because eleven others were waiting. One engineer has asked whether he must say when an agent wrote his code. A graduate joins in January. Write the working agreement for Routing, including the size ceiling you will propose and why, what you will ask the team to measure, and how you will handle the engineer who feels singled out by a size limit.

Self-check

DECIDE

You manage Delivery Reports at Wrenpost, eight engineers. Last quarter Akpevwe merged 54 changes against a team median of 18, and four incidents were linked to her changes against a median of two. She uses an agent heavily and is well regarded. Two of her four incidents passed review with one approval after a short review, and reviewers say her changes are large. The head of engineering has asked you in passing whether the team should work the way she does. What do you do?

READING
  1. PAPER
    Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity Joel Becker, Nate Rush, Beth Barnes and David Rein (METR), 2025

    The randomised trial behind the gap between how fast the tools feel and how fast work finishes. Read what the authors do not claim before you quote it in either direction. Read: The summary post: the design, the headline result beside what developers forecast and believed, and the list of claims the study does not make.

  2. POST
    We are Changing our Developer Productivity Experiment Design METR, 2026

    METR's own account of why its later data is an unreliable signal. The selection problems it describes, about which developers and tasks end up in a study, are worth checking for in any pilot you run.

  3. DOC
    State of AI-assisted Software Development 2025 DORA, 2025

    The survey evidence that AI amplifies the strengths and weaknesses an organisation already has. Read it for the conditions under which the tools pay off, and remember that survey data shows associations, not causes.

  4. DOC
    DORA's AI Capabilities Model DORA, 2025

    The practices DORA says make AI tools pay off, including a clear AI policy and working in small batches. A useful checklist when you write your team's agreement.

  5. DOC
    DORA's software delivery performance metrics Nathen Harvey (DORA)

    The delivery measures, grouped into throughput and instability. Use them at team level, as the guide intends, and not to rank people.

  6. HANDBOOK
    Small CLs Google Engineering Practices

    Google's public guidance on why changes should be small enough to review well. It predates coding agents, which is a reason to read it again when drafting a change takes minutes.

  7. HANDBOOK
    The Standard of Code Review Google Engineering Practices

    What a reviewer is for, and when to approve. Use it to write down what your reviewers may ask for and refuse.

  8. DOC
    AGENTS.md The AGENTS.md project

    An open, plain-Markdown format for the shared instructions your coding agents read. Read it when you decide where the team's instruction file lives and who maintains it.

All companies and people in these examples are fictional. Any resemblance to a real business or person is unintended.

RECALL CARDS Tap to flip. They join your review deck when you mark the lesson complete.
NEXT: Team health and culture →