When (Not) to Use an Agent

There are times where it is pru­dent to use an AI agent (like Codex) ag­gres­sively. There are other times where they should be avoided like the plague. The ques­tion of into which bucket a par­tic­u­lar en­deavor falls is dif­fi­cult to an­swer. Any­one who says you should al­ways or never use an LLM is over­sim­pli­fy­ing the prob­lem.

Naturally, any­thing pre­scrip­tivist re­lated to LLMs on­line should be re­garded with a fair amount of skep­ti­cism. That in­cludes what I have to say.

There Is a Difference

AI agents can be enor­mously help­ful. The key word is can”. It is not al­ways a guar­an­tee.

Indeed, most de­vel­op­ers say that they es­ti­mate their pro­duc­tiv­ity mul­ti­ple to be greater than one when sur­veyed. In other words, they think that their pro­duc­tiv­ity at least dou­bles when they use ei­ther Claude Code or Codex. In re­al­ity, agents can of­ten slow you down, even if it feels like they are help­ing. In­deed, an METR study found that they more fre­quently coun­ter­pro­duc­tive than pro­duc­tive, even if the de­vel­oper feels oth­er­wise.

Over the last few months, I have been anec­do­tally track­ing the types of tasks that I’ve found to be em­pir­i­cally bet­ter done with an agent, and the types of tasks that are bet­ter done with only the meat be­tween my ears. I’ve in­stilled that ex­pe­ri­ence down to a set of prin­ci­ples which, I be­lieve, can be em­ployed to save any soft­ware en­gi­neer a de­cent amount of time. This post in­cludes a few of those prin­ci­ples.

Your Mileage May Vary

Before we get to those prin­ci­ples, how­ever, I would like to make my re­al­ity clear to those read­ing. I work on highly-tech­ni­cal in­te­grated sys­tems that in­volve a high level of knowl­edge. Mak­ing spu­ri­ous mod­i­fi­ca­tions to these sys­tems can have out­comes that are dif­fi­cult to pre­dict with­out a good men­tal model of how they work.

That means many bugs can be solved in just a few lines of code, and many fea­tures can be im­ple­mented by sim­ply con­nect­ing two seem­ingly un­re­lated sys­tems in a strate­gic way.

My ex­pe­ri­ence may not match yours, es­pe­cially if you work on sys­tems more loosely in­te­grated.

Err on the Side of Agent-Free Development

Back in my day, we would have just called it development’.” - Me, af­ter writ­ing the above head­ing.

If you can­not ar­tic­u­late why an agent would be bet­ter or faster at com­plet­ing a task, it is prob­a­bly be­cause you should do it by hand.

In the early days of my ex­plo­rations into ChatGPT, and later into Codex, I found my­self reach­ing for the shiny new tool every chance I could. It be­came a habit. I would sit down at my lap­top, de­cide what I wanted to work on, and the next thing I knew I would be typ­ing a prompt into one LLM or an­other.

I see why it’s easy to fall in love with these things, be­cause the vari­able pos­i­tive re­in­force­ment slot ma­chine cow­boy hack­ing is hon­estly more fun than if it had just got­ten it right on the first try.” - Matt Mullenweg

Honestly, it does­n’t mat­ter how these habits are built and then re­in­forced. What mat­ters is how turn­ing use of Codex or Claude Code into a habit re­sults in a lot of wasted time.

Sure, some­times the agent will get it right on the first try. The prob­lem is that if it fails, you of­ten need to start from scratch in or­der to end up with a prod­uct that’s work­able. I have found my­self spend­ing hours re­fin­ing prompts and go­ing back-and-forth with an agent, only to throw it all out and code a bet­ter so­lu­tion my­self in less than fif­teen min­utes.

The crit­i­cal piece here is that if you roll the dice, the po­ten­tial for lost time is in­fi­nite while the po­ten­tial for time saved is fi­nite and of­ten quan­tifi­able.

So, if you can­not pre­cisely ar­tic­u­late why you be­lieve an agent will be able to do the job in less time than if you did the job your­self, you should at­tack the prob­lem with­out one. At least at first.

Use an Agent for Large Refactors

There will al­ways be times where the ded­i­cated tool­ing for your pro­gram­ming lan­guage of choice is­n’t enough.

I have en­coun­tered sit­u­a­tions where I have needed to con­vert an in­ter­face into a class and cases where I needed to change a sta­t­i­cally dis­patched sys­tem into a dy­nam­i­cally dis­patched one. These are the kinds of prob­lems that are great for agents to han­dle, be­cause the logic is sim­ple to ver­ify and most of the changes are merely syn­tac­tic.

At the time, the ded­i­cated Rust and C++ tool­ing at my dis­posal was not ca­pa­ble of do­ing such things. When I threw an agent at the prob­lem, it was more than ca­pa­ble of mak­ing the changes and ver­i­fy­ing that they do what I want. In fact, I sus­pect it made the ex­act ed­its that I would have made. At the very least, I was saved some typ­ing.

Put an­other way, if the bulk of the prob­lem is busywork”, let an agent han­dle it so you can fo­cus on the more com­plex is­sues re­main­ing.

Core Systems Should Not Be Written by an Agent

Systems core to a piece of soft­ware have two key re­quire­ments that, at the time of writ­ing, can­not be ful­filled by any agents on the mar­ket. They need to:

  1. Be Flexible.
  2. Aggressively mod­eled to the do­main.

Flexibility means that the sys­tem can be ex­tended or mod­i­fied with­out much ef­fort. That it can be imag­ined as a whole by your­self and any fu­ture con­trib­u­tors, and se­man­tic changes to mi­nor com­po­nents are un­likely to un­ex­pect­edly af­fect other mi­nor com­po­nents. Right now, no agents are ca­pa­ble of do­ing this. Trust me — I’ve tested them.

Similarly, core sys­tem ar­chi­tec­ture needs to fit the do­main or prob­lem it seeks to solve. Oth­er­wise, it will take un­due ef­fort to im­ple­ment the small­est bit of func­tion­al­ity. Just like the in­de­scrib­able qual­ity of flex­i­bil­ity, this trait too is not rep­re­sented by the code gen­er­ated by agents on the mar­ket. Their so­lu­tions are ei­ther too gen­eral or too di­rect. In ei­ther case, the code turns out to be far from ex­ten­si­ble.

Extensions Are Perfect for Agents

While core sys­tems should be ar­chi­tected with hu­man mus­cle, ex­ten­sions to that sys­tem can be built with agents.

Extensions are usu­ally smaller in scope, re­stricted in ca­pa­bil­ity by their en­vi­ron­ment, and are less likely to af­fect other sys­tems. That means they are gen­er­ally eas­ier to re­view, less likely to in­tro­duce se­cu­rity vul­ner­a­bil­i­ties, and cre­at­ing them does­n’t re­quire an in-depth men­tal model.

This is why soft­ware like Telex is so ef­fec­tive. It is also why those who work with ver­ti­cally in­te­grated sys­tems are like­lier to run into is­sues when us­ing agents than with hor­i­zon­tally in­te­grated sys­tems.

What Is Your Experience?

I’m still learn­ing how and when to in­te­grate agents into my work, as is every­one else. I’m cu­ri­ous: have you found spe­cific kinds of is­sues or bugs that are best tack­led with an agent? Are there spe­cific mo­ments where you feel more pro­duc­tive with­out one? I am cer­tain there are nu­ances I’ve missed here. What are they?

Published March 27, 2026 at 6:00 AM

Proofread by Harper.

Comments