Tests are the first thing you should delegate
Can AI agents write your tests? Yes, and if your team is choosing its first real delegation, tests are where to start. Not because test code is unimportant, but because test-writing has the three properties that make delegation safe to learn on: the output is mechanically verifiable, the blast radius is bounded, and the payoff lands on work your team was never going to staff anyway.
Most teams pick a feature as their first agent experiment, which is exactly backwards. A feature is open-ended, hard to verify, and touches production. Letting agents write tests teaches the team the delegation muscle, task definition, checkpoints, verification, on terrain where a failure costs almost nothing.
Why tests are the ideal first delegation
Verifiability comes first. A test either runs or it does not, passes or fails, and you can check it does its job by breaking the code it covers. No other engineering artifact offers feedback that cheap.
The blast radius argument matters just as much. A bad test does not take down production. The worst case is false confidence, which is real and addressed below, but it is a slow risk you can audit, not a Saturday incident.
And the payoff is immediate because nearly every codebase is under-tested in exactly the places nobody wanted to work: the legacy module with no coverage, the error paths, the integration seams. That backlog existed because test-writing was skilled, tedious, and never urgent. Agents removed the tedium and the cost. The work that was perpetually deferred is now an afternoon of supervision.
The failure mode: tests that assert nothing
Delegate carelessly and you get assertion theater. An agent pointed at a module with "add tests" will happily produce suites that mirror the implementation line by line, mock every collaborator, and then assert on the mocks. Coverage climbs, protection does not. The suite goes green on code that is broken in every way that matters.
Two countermeasures, both cheap. First, review tests as what they are: the executable specification of your system. A test file deserves the same reading as the code it guards, and "does this assert behavior or implementation" is a question a reviewer can answer in seconds. Second, spot-check with mutations: change a real behavior, a boundary condition, a sign, an off-by-one, and run the suite. If nothing fails, the tests are decorative, and you have learned it for the price of one command.
Asking the agent to demonstrate each test failing before the fix, or against a deliberately broken version, builds the same proof into the workflow itself.
How to have AI agents write tests well
Scope by module, not by codebase. Hand the agent one module, its public behavior described in a sentence or two, and a target: coverage of changed code, the error paths, the boundary conditions. Ask it to state, per test, what would have to break for the test to fail. That one requirement filters out most theater on its own.
Set coverage targets on changed code rather than chasing a global number, since global coverage is a vanity figure that rewards testing the easy parts. And on legacy systems, start with characterization tests that pin down current behavior before anyone changes it, which is why old codebases are surprisingly good agent territory.
Put your conventions in a skill
The tenth delegated test task should not restate what the first nine explained. Naming patterns, fixture and factory usage, what to mock and what must never be mocked, how integration tests get their data: write it once and version it in the repo as a skill the agent loads whenever it writes tests. Consistency is what keeps a fast-growing suite navigable, and a skill is how one developer’s testing judgment becomes the team default without a meeting.
The compounding return
Here is why tests-first is strategic rather than merely safe. Every later delegation, features, refactors, migrations, is only as safe as your verification, because the test suite is the leash that lets agents run. Delegating tests first means your first agent workstream directly strengthens the thing every future workstream depends on. Teams that start here reach confident feature delegation months faster than teams that started with features and discovered their safety net had holes.
It also gives skeptics a clean trial: nobody’s production code is at stake, the output is auditable, and the result either survives mutation checks or it does not.
When we sequence a rollout in an agentic engineering engagement, tests are almost always workstream one for exactly these reasons. Delegation is a skill your team has to learn somewhere. Learn it where mistakes are cheap and the artifact left behind makes everything after it safer.