Delegating Work to Coding Agents
An agent will take almost any task you give it and return something that looks finished. The manager's skill is choosing which tasks to hand over, shaping each one so the result can be checked, and writing a brief that carries the context the agent cannot guess. A five-test screen and a one-page brief turn that from instinct into a team habit.
After this chapter you can
- Screen a task with five yes-or-no tests, then rewrite a single failure or keep a double failure with a person.
- Price a delegation as brief time plus review time against doing the work by hand.
- Write a seven-part brief that includes a done command, stop rules and a list of what was not verified.
- Reshape a vague ticket such as making checkout faster into a measurable, scoped task.
- Set review time and a named reviewer before the run starts, and keep the brief in the ticket.
In June 2025, Max Mitchell, an engineer, published his reading of about 50 commits in an open-source OAuth library from Cloudflare. By his account AI had generated over 95 percent of the code, and the commit history kept the prompts that produced it1. The interesting part is not the percentage. It is the shape of the prompts and the point at which the engineer in charge started doing some of the work himself. The prompts gave the model clear context about the current state, said why a change was needed and named the next step. By Mitchell’s account, manual intervention became necessary around the twentieth commit.
That is the question in front of a manager now. An agent will accept any task, so the decision about which tasks to hand over falls to you and your engineers, and it is made dozens of times a week. Your teammates have probably also noticed that the same assistant that saves an afternoon on one ticket can waste one on the next. What follows is a screen for choosing, a way to size the work, a one-page brief and a place for review time in the plan.
Level 1 gave you the idea of an agent mandate and a handoff packet: say what the agent may do and what it passes back to a person. This chapter applies that to a software team, task by task.
Five tests before any task goes to an agent
Suitability is not a property of the whole backlog. It is a property of each task, and five yes-or-no questions cover most of what goes wrong. The tests are a screening tool and not a law of nature; teams will adjust the wording.
Checkable matters most. Anthropic’s guidance on building agents notes that code solutions are verifiable through automated tests and that agents can iterate using test results as feedback, while adding that human review remains crucial for fit with the broader system2. A task such as “migrate these 40 call sites to the new client and keep the existing tests green” has a done command. A task such as “improve the error handling” does not, and the agent will fill the gap with its own opinion.
One change is about the reviewer as much as the agent. A change a person can read in one sitting gets read; a sprawling one gets skimmed. The next chapters of this module return to review load, so for now treat size as a limit on what one brief may ask for. Treat a diff of a few hundred lines as an illustrative starting value, not a rule; the right number is whatever your reviewers can read carefully, and you can find it by looking at how long review takes on your own pull requests.
Context on hand separates tasks the agent can do from tasks only someone with the history can do. If the reason for a design lives in a person’s head or a chat thread from last year, the agent will produce something plausible that ignores it. Either put the reason in the repository instruction files, or in the brief, or keep the task.
Reversible is the safety test. A refactor on a branch can be thrown away. A change that touches credentials, a production database or a shared pipeline cannot be judged by looking at the diff alone. Those tasks fail this test no matter how well the others go, and the next chapter covers how to fence them off.
Named reviewer is the test teams forget. Without a person who has agreed to review, with time in the week to do it, the result waits in a branch or gets merged on trust.
What the screen tells you to do
Count the failed tests. Passing all five means delegate. Failing one usually means the task can be repaired: add a test to make it checkable, split it to make it one change, paste in the missing context, move it to a branch, name a reviewer. Failing two or more means the task needs a person first, often to make a design decision, and the agent can take the mechanical part afterward. This is the same judgment you would apply to handing work to a new colleague, except that an agent may press on with a guess instead of saying “I am not sure what you want here”, unless the brief tells it to stop.
Size the task and price the whole of it
The cost of delegating is not the agent’s run time. It is the time to write the brief, plus the time to review the result, plus the rework when the review finds a miss. A simple budget makes this visible before you commit.
One piece of evidence says to measure rather than assume. In METR’s randomized trial, 16 experienced open-source developers working on 246 tasks in mature repositories they knew well took 19 percent longer when allowed early-2025 AI tools; they had expected to be about 24 percent faster, and afterward still believed they had been about 20 percent faster3. That is one study of one setting and early tools; a second METR round in February 2026 used newer tools and found completion times shifting by -18 percent among repeat participants (range -38 to +9 percent) and by -4 percent among newcomers (range -15 to +9 percent), with METR flagging the sample as unreliable because of who opted in4. Neither shows how your team will fare. It shows that felt speed and measured speed can differ, which is a reason to keep a before-and-after record of brief, run and review time on your first batch of delegated tasks.
The rule that keeps the budget honest is a ratio. Delegate when brief time plus review time is well under what the task would take by hand; a starting value is under half. If an engineer estimates 3 hours by hand and the brief and review will take 50 minutes, delegation wins. If the brief and review will take 2 hours, the saving is thin and the risk is not. Treat 50 percent as an illustrative starting value that you tune with data.
The brief: one page that carries the context
A brief is the written form of the mandate. It exists because the agent starts every task knowing only what you put in front of it. The seven parts below are a working template, not a tested standard.
Two parts earn special attention. Done criteria should be commands, not adjectives. “Clean code” cannot be run; “the linter reports zero warnings and the existing suite passes” can. The caveat is that a test passing shows only what the test covers, so for work where the tests are weak, say so in the brief and make the reviewer’s check explicit.
Stop rules are the part brief-writers skip, and they are what you want when the agent is stuck. An agent told to make the tests pass may rewrite the tests. A stop rule such as “halt and report if a test needs to change” turns that temptation into a report. The output section completes the loop: asking for a list of what was not verified gives the reviewer a place to start. This is the handoff idea from Level 1, in a form a reviewer can use.
Case: what the Cloudflare commits show
Return to the commits. Mitchell’s reading offers a concrete picture of delegation as a sequence of small briefs, not one large command1. The opening prompt included a substantial code block showing exactly how the library would be used, which is a done criterion in miniature: here is the interface we want. Later prompts followed the pattern of current state, reason for the change and specific direction. The commit messages themselves carry the prompts, one example reading simply “Ask Claude to store the props encrypted” in the public repository5.
Mitchell also records where the engineer took work back. He fixed placement of a class declaration by hand, handled a search-and-replace Claude could not do over duplicated blocks, and cleaned up styling and unused methods; a remark the post attributes to Kenton Varda, as quoted there, was “I really could have done this one faster by hand, oh well.”
Read this as a case about task selection and not a verdict on any tool. It is one project, an OAuth library built on an established standard, and the post is one reader’s account; its author also writes that human oversight was essential throughout and that AI independently implementing libraries of this scope is still far off. The lesson that travels is narrower, and is my reading of the post: the prompts that carried the work gave an interface and a clear next step, and the places where the engineer took over were small fiddly ones such as placement and cleanup. The screen above is a way to see that coming.
A team-sized worked example
The numbers here are constructed to show the arithmetic; none of the figures is a measurement. A team of eight engineers has twelve candidate tickets for the sprint and a mandate from their director to “use agents more”. The lead runs the five tests on each ticket in a 40-minute backlog review.
Five tickets pass all five tests. Four fail exactly one: two lack a runnable check, one spans two services, and one needs context that exists only in a chat thread. Three fail two or more, including a pricing-rule change that needs a design decision and touches live data. Five plus four plus three is twelve.
The lead rewrites the four single-failure tickets. A test is added to each of the first two, the third (which spanned two services) is cut down to one service, and the chat thread is summarized into the fourth ticket’s context. Three of the four now pass. The cut-down ticket still depends on a decision about an API shape, so it goes back to a person. The count is now eight to delegate (five plus three) and four to keep (the three double failures plus the one that still fails).
Then the lead prices the delegation. Each of the eight briefs is budgeted at 20 minutes, 160 minutes in all, and each review at 30 minutes, 240 minutes in all: 400 minutes, or about 6 hours 40 minutes. The engineers estimate 3 hours by hand for each of the eight, 24 hours, or 1,440 minutes. The ratio is 400 divided by 1,440, about 28 percent, under the 50 percent starting threshold, so the plan goes ahead. The lead also schedules the reviews on named days and writes the ratio on the sprint board, to compare against actuals at the end. If the actual ratio comes in above 50 percent, the next sprint’s screen gets stricter.
What this means for engineering managers
Your Monday action: pick three tickets from this week’s plan, screen them, and write one brief using the template below; you or your tech lead owns the screen, and each brief names its reviewer. The 400-line stop rule, the 50 percent ratio and the minutes in the tables are illustrative starting values to replace with your own.
TASK BRIEF
Goal: <outcome, and why it matters>
Scope: may change: <paths> must not touch: <paths>
Context: <docs, ADRs, example files to follow>
Constraints: <dependencies, style, performance, data rules>
Done when: <command 1> passes; <command 2> reports zero ...
Stop and report: <conditions: test must change, scope exceeded, size over N lines>
Hand back: summary; what was NOT verified; commands run
Reviewer: <name>, review by <day>
Check yourself
- If an agent can attempt any task, the manager’s main job is to make sure every ticket is handed to one.
- A task that fails exactly one of the five tests can often be repaired by rewriting it.
- A brief that says only to make the tests pass is a complete done criterion, because the agent will not change the tests.
- The time that decides whether delegation pays is the agent’s run time.
- In Mitchell’s reading of the Cloudflare commits, the engineer still did some work by hand.
- In METR’s trial, experienced developers were faster with AI tools, as they expected.
Reflection
What comes next
A good brief tells the agent what to do. It does not limit what the agent can reach while doing it. The next chapter, Supervising Agents: Permissions, Sandboxes and Review Loops, covers what an agent may read, run and change on your systems and how to enforce those limits.
References
- Max Mitchell. I read all of Cloudflare's Claude-generated commits. maxemitchell.com. 2025.
- Erik Schluntz and Barry Zhang. Building effective agents. Anthropic Engineering. 2024.
- Joel Becker, Nate Rush, Elizabeth Barnes and David Rein. Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity. METR (arXiv 2507.09089). 2025.
- METR. We are Changing our Developer Productivity Experiment Design. METR. 2026.
- Cloudflare. Ask Claude to store the props encrypted. (commit adcbb5d). GitHub, cloudflare/workers-oauth-provider. 2025.
Further reading
- Erik Schluntz and Barry Zhang. Building effective agents. Anthropic Engineering. 2024.
- Joel Becker, Nate Rush, Elizabeth Barnes and David Rein. Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity. METR (arXiv 2507.09089). 2025.
Sources last verified 2026-10-13.