blog dds: 2026-07-08 — Why agentic AI needs better experts
Diomidis Spinellis blog
Why agentic AI needs better experts
Search
Search the blog
Close
Over the past few days I changed<br>the way the uutils project’s<br>sed program<br>handles data to default from characters to raw bytes.<br>This improves compatibility with GNU sed and also performance.<br>Given the change’s size and extent<br>(13 changed files, 1740 insertions, 609 deletions),<br>I worked with an AI agent (OpenAI Codex),<br>which allowed me to experience first-hand both its power and limitations.
On the one hand, Codex guided me correctly toward the task<br>and handled it successfully both through the initial prompt and<br>through refinements.<br>It handled expertly a lot of tedious grunt work,<br>saving me time and effort.<br>At all stages the modified code compiled and run successfully.<br>(Having a large set of unit and integration tests as well<br>as CI checks helped guide the agent.)
On the other hand, I realized that to obtain production-quality code,<br>Codex’s work needed careful reviewing and extensive expert guidance.<br>At the end of this post I have included all prompts that I issued,<br>with the ones that guided Codex to improve the code formatted in bold.<br>From the 78 prompts and sub-prompts 61 (78%) asked for improvements.
So,
if you’re learning to program think about how you’ll obtain<br>the knowledge and experience required to recognize such issues<br>and prompt an agent to fix them;
if you’re managing software development or HR,<br>plan how you’ll onboard new developers to obtain these skills; and
if you’ve decided to outsource coding completely to AI agents,<br>consider whether you’re OK with your code gradually deteriorating<br>and acquiring technical debt by missing improvements<br>such as the ones I identified and asked Codex to fix.
To be fair, agents continuously improve, and many of the prompts<br>I gave, such as those involving comments and unit tests,<br>could have easily be handled by a more capable agent or<br>even with a suitable initial agent configuration.<br>But, as coding agents improve, the tasks we give them will also become<br>more demanding, as will become the required reviewing and expert guidance.
Finally, there’s AI’s monetary and environment cost,<br>which may mean that not all work that can be done by an AI agent<br>is worth doing it thus.<br>(I made several changes on my own, mainly to save time and waste.)<br>At the end of the session, Codex (using gpt-5.5) reported<br>Token usage: total=4,298,673 input=4,113,242 (+ 110,110,848 cached) output=185,431 (reasoning 30,920).
ChatGPT calculates<br>that with current prices the session’s tokens would cost about $80.<br>(I used Codex through my OpenAI subscription and current token costs<br>are probably subsidized, but the figure gives the true cost’s likely magnitude.)<br>My guess is that for sustained use the cost would mirror that<br>of a developer salary.<br>This is not unreasonable given the benefit I received, but organizations<br>certainly need to weigh that cost into their budgets.
I was surprised by the session’s large environmental impact.<br>ChatGPT (based on Mistral’s Le Chat reporting) gave me<br>~326 kg CO₂e and ~12,871 L of water usage.<br>To put these values into perspective the CO₂ emissions are similar<br>to a 2,5000 km trip in an efficient diesel/gasoline car or<br>one short/medium-haul passenger round trip.<br>And if we price these externalities, the CO₂ emissions cost<br>€26 through the EU ETS carbon price or<br>$42–117 through the US EPA social cost of carbon.<br>The cost of the water used in the local Athens domestic water tariff<br>would be ~€4.50–41.<br>Again, these costs are not astronomical, but also far from negligible.
Session Prompts
Below are the prompts I gave during the session.<br>Those associated with improvements I spotted are formatted in bold.<br>Note that some of the unit tests I asked were missed in previous versions,<br>so they’re code improvements requiring human prompting<br>but not the agent’s fault.
How can I see GNU sed compatibility score?
How can I update the chart?
What is the highest priority change to reduce the number of failing GNU compatibility tests?
Good. So modify the code to Represent pattern space, hold space, transliteration input/output, and script literals as bytes internally, converting to UTF-8 only for Unicode-aware regex paths that actually require it. Ensure that all local tests continue to pass. Also GNU tests should improve. Be careful not to break the fast_ optimizations.
change the struct Transliteration field named fast into byte_fast.
Isn’t there a library function for script_text_to_bytes?
Add the comment and unit tests.
I think script_text_to_bytes is the wrong approach. Handle the script as bytes.
In the as_str()? cases shouldn’t we report an appropriate input_runtime error where applicable?
Should the ScriptCharProvider::new initializations simply deal with bytes?
I run git subst current_bytes current ; git subst next_line_bytes next_line to make the code mirror the original. But I broke it. Please fix it.
If we have...