Should You Use an AI Coding Agent or Code It Yourself
A four-axis scoring framework, tested against real examples like renaming a variable versus redesigning auth, that tells you exactly when to delegate a coding task to an AI agent and when to write it yourself.
Score the task, not the tool. Before you hand anything to an AI coding agent, run it through four filters: how well-specified the task is, how reversible a mistake would be, how much of the codebase it touches, and whether you have a fast way to verify the output. A task that scores well on all four is safe to delegate. A task that fails two or more should stay in your hands, at least for the first pass.
That's the whole decision rule. The rest of this is about applying it consistently instead of deciding by mood, deadline pressure, or how confident the agent sounds in its own explanation.
Why "can it write the code" is the wrong question
Most AI coding agents can technically produce working code for almost anything you ask: a CRUD endpoint, an auth check, a data migration script. Capability isn't the bottleneck anymore. The real question is whether you can trust the output without becoming a full-time reviewer of everything it touches. Agents sound confident even when they're wrong, and a loosely scoped instruction can lead one to rewrite code you never asked it to touch, see why AI writes code that doesn't work for the mechanics of that failure mode. So the deciding factor isn't "can it," it's "can I verify this cheaply enough that delegating actually saves me time."
That's a task-level judgment, not a tool-level one. The same agent that nails a form validation fix in ten seconds can spend an hour going sideways on a database schema change. Score each job on its own, every time, rather than deciding once and applying that verdict to everything you ask it to do afterward.
This also means the question "should I use an AI agent or write it myself" doesn't have one answer for your whole project. A founder building an internal tool solo might delegate most of the routine work and still keep the billing logic entirely in their own hands. A team with a mature test suite can safely push that line further, because verification is cheap. A team touching a codebase with sparse coverage should push it back, because a wrong answer might not surface until a customer hits it.
The four-axis framework
Rate the task from 1 (bad) to 3 (good) on each of these before you decide who does the work.
Axis | Score 1 | Score 2 | Score 3 |
|---|---|---|---|
Spec clarity | Vague, "make it better" | Rough scope, some ambiguity | Precise, testable requirement |
Reversibility | Hard to undo (prod data, published API, live users) | Undoable with effort | One git revert away |
Blast radius | Touches auth, billing, or shared infrastructure | Touches a handful of connected files | Isolated to one file or function |
Verifiability | No fast way to check correctness | Requires manual testing | Tests or types catch a wrong answer instantly |
Add the four scores together. 10-12 means delegate and skim the diff. 7-9 means delegate but review closely, line by line, along the lines described in how to review AI-generated code before you ship it. 4-6 means write it yourself, or let the agent draft a rough version you'll heavily rework. Below 4, don't hand it to an agent unsupervised at all.
Scoring real tasks
Rename a variable used across the repo. Spec clarity 3, reversibility 3, blast radius 2 (touches many files, but mechanically), verifiability 3 (the compiler and existing tests catch anything missed). Total 11. Delegate with confidence. This is exactly what agents are fast and reliable at: repetitive, mechanical, checkable by tooling rather than judgment.
Redesign the authentication flow to support SSO. Spec clarity 1 (session handling, token refresh, and edge cases all hide inside "add SSO"), reversibility 1 (a mistake locks out every user or opens a hole), blast radius 1 (security-critical, shared across the app), verifiability 1 (bugs here often surface days later as incidents, not test failures). Total 4. Design the architecture and make the security decisions yourself. Let the agent implement narrow pieces only after you've already decided how the system should work.
Add a field to a settings form and wire it to the API. Spec clarity 3, reversibility 3, blast radius 2, verifiability 2 (mostly manual click-testing, though types catch some mistakes). Total 10. A solid delegate candidate, review the diff before merging but don't expect surprises.
Fix a flaky test in the payment reconciliation suite. Spec clarity 2 (you know the symptom, not the cause), reversibility 2, blast radius 2, verifiability 1 (flaky tests are hard to confirm fixed rather than just masked). Total 7. Middle ground: let the agent investigate and propose a fix, but read it closely before merging, and if the first attempt just changes symptoms instead of causes, that pattern is covered in how to debug AI-generated code.
When to use an AI coding agent
Delegate confidently when the task looks like one of these:
Mechanical, repetitive changes with a clear before and after: renames, refactors that don't change behavior, boilerplate you'd otherwise copy-paste.
Work that already has tests in place, so the output gets checked automatically instead of relying only on your eyes.
Greenfield scaffolding, new files and new modules where there's nothing established yet to accidentally break.
Anything you'd normally look up rather than reason through: config syntax, a library's API shape, a regex you'd otherwise Google.
Small, contained bug fixes where the failure mode is obvious and the fix stays local to one function.
When not to trust AI with code
Keep these in your own hands, or at minimum treat the agent's output as a rough draft, not a finished answer:
Anything touching money movement, authentication, permissions, or data deletion, where a subtle mistake is expensive or stays invisible until it's a security incident.
Decisions with no single right answer: architecture trade-offs, consistency versus availability, build versus buy. "Working" isn't the same as "correct" here.
Changes to shared code with many callers, where the agent can't see every place its edit matters and may quietly alter behavior nobody asked it to touch, a pattern common enough to warrant its own piece: stop AI from changing code you didn't ask it to.
Anything you can't verify quickly. If confirming correctness takes longer than writing the code yourself would have, delegating didn't save time, it just moved the work from writing to auditing.
Legacy code with no tests and undocumented assumptions, where the agent has no way to know what it's allowed to break and neither, honestly, do you until something fails.
A pre-flight checklist
Before you type the prompt, ask yourself four questions:
Could I write the exact acceptance criteria in one sentence? If not, the agent can't hit a target you haven't defined either.
If this goes wrong in production, how long until someone notices, and how bad is it when they do?
Am I touching one function, or a web of callers spread across the codebase?
Do I have a test, a type check, or a fast manual check that will catch a wrong answer in under a minute?
Comfortable yes to all four: delegate and move on. Hesitated on more than one: you're the safer author for this particular task, today, on this codebase, even if an agent could technically produce something that looks right on the first pass.
The pattern that trips people up isn't a bad agent, it's applying the same trust level to every task regardless of what's actually at stake. A broader look at the current field of AI coding tools is useful context if you're choosing between options, but the tool matters less than the task-by-task discipline of scoring before you delegate.
Common questions
When should I use an AI coding agent instead of writing the code myself?
Use one when the task is well-specified, easy to undo if wrong, contained to a small part of the codebase, and something you can verify quickly with a test or a type check. Mechanical refactors, boilerplate, and small bug fixes with obvious failure modes are the clearest cases.
What's the biggest risk of trusting AI with code I haven't reviewed?
The output can look complete and pass a casual read while still containing a wrong assumption, a silently skipped edge case, or a change to a file you never meant to touch. The cost usually shows up later, often in production, which is why fast verification matters more than fast generation.
Is it faster to delegate a task even if I have to review it carefully afterward?
Only if the review is meaningfully shorter than writing the code from scratch would have been. For high-stakes or high-ambiguity tasks, review can take longer than writing it yourself, because you end up reconstructing the reasoning the agent skipped.
Should I let an AI agent touch authentication or payment code at all?
You can, but only for narrow, well-defined pieces you've already architected, not for open-ended redesigns. Treat anything in this territory as a 1 or 2 on reversibility and blast radius by default, and review it the way you'd review a junior engineer's first pull request to a system that can't fail quietly.
How do I know if I'm becoming too dependent on AI agents for coding decisions?
If you can no longer explain why a piece of code works, or you're merging changes based on the agent's confidence rather than your own verification, you've drifted past delegation into abdication. Running tasks through the four-axis check before you start is meant to catch that drift before it becomes a habit.
For a comparison of coding agents against a different category of tool entirely, see AI coding agents vs AI app builders.
How did this land?
About the author

Staff Engineer, Platform
Carlo works on the platform that turns prompts into running apps. He writes the engineering deep dives and the changelog notes worth reading.


