<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Keesan</title>
    <description>The latest articles on DEV Community by Keesan (@keesan).</description>
    <link>https://dev.to/keesan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F918212%2Fc2767955-e703-44d6-a24e-5c2027a800ac.jpeg</url>
      <title>DEV Community: Keesan</title>
      <link>https://dev.to/keesan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/keesan"/>
    <language>en</language>
    <item>
      <title>Subagent Teams Need Handoff Receipts</title>
      <dc:creator>Keesan</dc:creator>
      <pubDate>Thu, 02 Jul 2026 21:38:41 +0000</pubDate>
      <link>https://dev.to/keesan/subagent-teams-need-handoff-receipts-3558</link>
      <guid>https://dev.to/keesan/subagent-teams-need-handoff-receipts-3558</guid>
      <description>&lt;p&gt;The first time agent teams work well, it feels like cheating.&lt;/p&gt;

&lt;p&gt;You give one agent the main task. You spin up another to inspect the codebase. Another checks tests. Another looks for edge cases. One researches docs. One writes a patch.&lt;/p&gt;

&lt;p&gt;Suddenly the work feels parallel.&lt;/p&gt;

&lt;p&gt;That feeling is addictive.&lt;/p&gt;

&lt;p&gt;It is also where a lot of the trouble starts.&lt;/p&gt;

&lt;p&gt;I learned this the hard way. First through earlier AI product work during the Amari AI days, then through Torram, and eventually through the much more intense loop of building with Claude, Codex, browser automation, scheduled automations, and subagent teams. We spent close to $10K across Claude and OpenAI credits, and a very real chunk of that was tuition for learning how agent orchestration actually fails.&lt;/p&gt;

&lt;p&gt;The short version:&lt;/p&gt;

&lt;p&gt;Subagents are useful. Subagent teams are powerful. But without handoff receipts, they quietly turn into chaos with better branding.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem is not delegation
&lt;/h2&gt;

&lt;p&gt;I am very pro-delegation.&lt;/p&gt;

&lt;p&gt;Claude Code's subagent model is directionally right: separate context windows, specialized roles, focused tools, and summaries back to the main session. Codex's multi-agent/worktree direction is also directionally right: parallel work, isolated tasks, repo-grounded execution, and background progress.&lt;/p&gt;

&lt;p&gt;That is exactly how serious AI coding work should evolve.&lt;/p&gt;

&lt;p&gt;The issue is what happens between the agents.&lt;/p&gt;

&lt;p&gt;A child agent can start late. It can fail before doing anything useful. It can do the wrong version of the task. It can duplicate work another agent already did. It can return a confident summary that hides weak evidence. It can time out. It can keep running after the parent has moved on. It can finish correctly but leave no useful handoff.&lt;/p&gt;

&lt;p&gt;From the outside, all of those can look similar:&lt;/p&gt;

&lt;p&gt;"The agent is working."&lt;/p&gt;

&lt;p&gt;That sentence is not evidence.&lt;/p&gt;

&lt;p&gt;It is a vibe.&lt;/p&gt;

&lt;p&gt;And vibes get expensive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Liveness is not usefulness
&lt;/h2&gt;

&lt;p&gt;One lesson we kept running into: liveness is not usefulness.&lt;/p&gt;

&lt;p&gt;An agent can be alive and still not be moving the task forward.&lt;/p&gt;

&lt;p&gt;It can be reading files forever. It can be stuck in a local loop. It can be rechecking the same assumption. It can be waiting on a command that should have failed fast. It can be producing a long summary of a short mistake.&lt;/p&gt;

&lt;p&gt;This is especially painful with subagents because the parent agent often wants to keep going.&lt;/p&gt;

&lt;p&gt;The parent says, "I dispatched a worker." Great. Did the worker start? Did it read the right files? Did it produce a patch? Did the verifier pass? Did it hit a blocker? Did it overlap with another worker? Did it leave a clean result?&lt;/p&gt;

&lt;p&gt;If those answers are not visible, the orchestration layer is basically asking you to trust a black box inside another black box.&lt;/p&gt;

&lt;p&gt;That is not a workflow.&lt;/p&gt;

&lt;p&gt;That is a prayer with logs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a handoff receipt should contain
&lt;/h2&gt;

&lt;p&gt;We started thinking about every delegated task as needing a small receipt.&lt;/p&gt;

&lt;p&gt;Not a giant report. Not a novel. Just enough state that a human or parent agent can make the next decision without guessing.&lt;/p&gt;

&lt;p&gt;The receipt should answer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Task&lt;/code&gt;: what was the worker actually asked to do?&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Owner&lt;/code&gt;: which agent or role owned it?&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Scope&lt;/code&gt;: which files, surfaces, or decision area did it touch?&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Start proof&lt;/code&gt;: did it actually begin, and what context did it load?&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Result&lt;/code&gt;: what changed or what did it learn?&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Verifier&lt;/code&gt;: what check proves the result?&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Blocker&lt;/code&gt;: what stopped it, if anything?&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Stop reason&lt;/code&gt;: why is the task ending now?&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Next action&lt;/code&gt;: what should happen next, if anything?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is it.&lt;/p&gt;

&lt;p&gt;The magic is not the format. The magic is forcing the system to distinguish between states that otherwise blur together.&lt;/p&gt;

&lt;p&gt;"Still working" is different from "blocked on auth."&lt;/p&gt;

&lt;p&gt;"Done" is different from "patch written but untested."&lt;/p&gt;

&lt;p&gt;"No findings" is different from "did not inspect the relevant path."&lt;/p&gt;

&lt;p&gt;"Failed" is different from "failed because the verifier is stale."&lt;/p&gt;

&lt;p&gt;Once those states are explicit, the parent agent can make a better call. So can the human.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters more as teams scale
&lt;/h2&gt;

&lt;p&gt;When you are using one agent in one repo, you can compensate with attention.&lt;/p&gt;

&lt;p&gt;You watch the terminal. You read the diff. You nudge it back. You catch the weirdness.&lt;/p&gt;

&lt;p&gt;Once you have multiple agents, background tasks, browser automations, scheduled runs, or cross-tool workflows, attention stops scaling.&lt;/p&gt;

&lt;p&gt;This showed up hard in our MartinLoop growth work too.&lt;/p&gt;

&lt;p&gt;The automations were supposed to run morning, midday, and evening sweeps. On paper, the workflow was clear: search GitHub, Reddit, Hacker News, Product Hunt, OpenAI community, student forums, and other surfaces. Post value-first comments where auth and thread quality supported it. Log candidates. Update watchlists. Learn from live results.&lt;/p&gt;

&lt;p&gt;But the real world is messy.&lt;/p&gt;

&lt;p&gt;Browser auth might exist visually but not be agent-controllable. A Reddit composer might appear but not expose a writable editor. HN might accept one comment and then rate-limit the next. OpenAI community might hide replies that read too promotional. LinkedIn might need queue hygiene but no live sends until identity and account safety are verified.&lt;/p&gt;

&lt;p&gt;None of those are "the model is bad."&lt;/p&gt;

&lt;p&gt;They are workflow state problems.&lt;/p&gt;

&lt;p&gt;And if the automation does not leave receipts, the next run starts from folklore.&lt;/p&gt;

&lt;p&gt;What happened? Was the channel blocked? Was auth missing? Was the browser bridge broken? Was the thread closed? Did we post? Did we only draft? Did we learn something?&lt;/p&gt;

&lt;p&gt;Without a receipt, every run becomes a little archaeology dig.&lt;/p&gt;

&lt;p&gt;That is where drift compounds.&lt;/p&gt;

&lt;h2&gt;
  
  
  The parent agent needs to be boring
&lt;/h2&gt;

&lt;p&gt;In a good multi-agent workflow, the parent agent should not be the hero.&lt;/p&gt;

&lt;p&gt;The parent should be boring.&lt;/p&gt;

&lt;p&gt;It should know what work exists, what state each worker is in, what evidence came back, and whether another attempt is justified.&lt;/p&gt;

&lt;p&gt;That is not glamorous, but it is the difference between orchestration and noise.&lt;/p&gt;

&lt;p&gt;For subagent teams, I now care less about how impressive the individual worker sounds and more about whether the parent can answer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which child tasks are active?&lt;/li&gt;
&lt;li&gt;Which ones are blocked?&lt;/li&gt;
&lt;li&gt;Which ones produced verified work?&lt;/li&gt;
&lt;li&gt;Which ones need review?&lt;/li&gt;
&lt;li&gt;Which ones should be killed?&lt;/li&gt;
&lt;li&gt;Which ones should not be retried?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last question matters.&lt;/p&gt;

&lt;p&gt;People love retrying agents. Sometimes that is right. Sometimes it is just budget burn wearing a clever hat.&lt;/p&gt;

&lt;p&gt;Before retrying, I want to know whether the failure class changed, whether the verifier improved, whether the remaining budget justifies another attempt, and whether the next worker has a different plan than the last one.&lt;/p&gt;

&lt;p&gt;If not, you are not orchestrating.&lt;/p&gt;

&lt;p&gt;You are rerolling.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule we ended up with
&lt;/h2&gt;

&lt;p&gt;The rule I like now:&lt;/p&gt;

&lt;p&gt;No receipt, no trust.&lt;/p&gt;

&lt;p&gt;That sounds harsh, but it is actually freeing.&lt;/p&gt;

&lt;p&gt;It means the agent does not have to be perfect. It just has to leave enough evidence for the next decision to be sane.&lt;/p&gt;

&lt;p&gt;A subagent can fail usefully if it tells you exactly what it tried, what blocked it, and what should happen next.&lt;/p&gt;

&lt;p&gt;A subagent can succeed dangerously if it returns a confident summary without proof.&lt;/p&gt;

&lt;p&gt;That is the mindset shift.&lt;/p&gt;

&lt;p&gt;The goal is not to make agents sound more senior. The goal is to make their work inspectable.&lt;/p&gt;

&lt;p&gt;That is what we are trying to capture with MartinLoop: not replacing Claude, Codex, or any other coding agent, but wrapping the loop with budgets, verifier gates, stop reasons, and run records so the human is not left guessing after the fact.&lt;/p&gt;

&lt;p&gt;Because the future is not one perfect agent doing everything.&lt;/p&gt;

&lt;p&gt;It is probably a bunch of imperfect agents doing useful pieces of work, with humans and runtime systems deciding what is actually allowed to continue.&lt;/p&gt;

&lt;p&gt;That future needs receipts.&lt;/p&gt;

&lt;p&gt;Download MartinLoop Today and govern your agent loops to be accountable. &lt;/p&gt;

&lt;p&gt;Open Source Repo:&lt;a href="https://github.com/Keesan12/Martin-Loop" rel="noopener noreferrer"&gt;https://github.com/Keesan12/Martin-Loop&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2 min download: &lt;br&gt;
npm install -g martin-loop&lt;br&gt;
npx -y martin-loop@latest doctor&lt;/p&gt;

&lt;p&gt;npx -y martin-loop@latest start&lt;br&gt;
npx -y martin-loop@latest demo&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>opensource</category>
      <category>devops</category>
    </item>
    <item>
      <title>What 12 failure classes and 30 Billion tokens spent taught us about trusting AI coding agents</title>
      <dc:creator>Keesan</dc:creator>
      <pubDate>Tue, 30 Jun 2026 20:41:47 +0000</pubDate>
      <link>https://dev.to/keesan/what-12-failure-classes-and-30-billion-tokens-spent-taught-us-about-trusting-ai-coding-agents-pi7</link>
      <guid>https://dev.to/keesan/what-12-failure-classes-and-30-billion-tokens-spent-taught-us-about-trusting-ai-coding-agents-pi7</guid>
      <description>&lt;p&gt;We've been watching AI coding agents fail in production for long enough that we started keeping a taxonomy.&lt;/p&gt;

&lt;p&gt;Not "the agent hallucinated" — that's not a failure class, it's a category. The real failure modes are specific, they repeat, and crucially, they each require a different fix.&lt;/p&gt;

&lt;p&gt;Here's what we found across hundreds of real runs, and why it changed how we think about agent governance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsj88thqsfby7qsb5gbc7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsj88thqsfby7qsb5gbc7.png" alt="12-class-failure-taxonomy" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The failure modes that actually kill agent runs:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Hallucination&lt;/strong&gt; — &lt;br&gt;
The agent generates code that looks right and tests that confirm it, but the test is testing the wrong thing. This is the scariest class because it has a green result. &lt;/p&gt;

&lt;p&gt;The fix is grounding: forcing the agent back to the actual repo state before the next attempt.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Scope creep&lt;/strong&gt; — The agent modifies files outside the task boundary. Usually well-intentioned — it "fixes" something adjacent — always dangerous. &lt;/p&gt;

&lt;p&gt;The fix is file scope enforcement: deny-listed paths that roll back automatically on violation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Fake-passing tests&lt;/strong&gt; — &lt;br&gt;
The agent writes tests that pass but don't test the actual behavior. Closely related to hallucination but distinct: the code is often correct, the test just isn't covering the right cases. &lt;/p&gt;

&lt;p&gt;The fix is verifier separation — your test command is the ground truth, not the agent's confidence level.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Budget pressure shortcuts&lt;/strong&gt; — &lt;br&gt;
When a run is approaching its token budget, agent behavior degrades. It starts making confident guesses instead of reading files. Results get worse as context gets longer. &lt;/p&gt;

&lt;p&gt;The fix is pre-execution budget preflight: stop the attempt before it starts if it's projected to breach remaining budget, rather than letting it run degraded.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Context bloat&lt;/strong&gt; —&lt;br&gt;
By attempt 5, the agent is paying to resend everything that failed four times. Token cost grows exponentially across retries while signal stays flat. &lt;/p&gt;

&lt;p&gt;The fix is context distillation: compress prior attempt history into a structured summary before the next attempt, not a raw failure dump.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Environment mismatch&lt;/strong&gt; —&lt;br&gt;
The agent passes in CI but the verifier runs in a different environment. Node version, pnpm vs npm, missing env vars.&lt;/p&gt;

&lt;p&gt;The fix is environment canonicalization in the run contract.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Approval boundary violations&lt;/strong&gt; —&lt;/p&gt;

&lt;p&gt;The agent modifies files that should require human sign-off: config, migrations, CI definitions. Often not malicious, just overambitious. &lt;/p&gt;

&lt;p&gt;The fix is policy routing — flag these attempts for a different approval path before execution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. Injection in tool output&lt;/strong&gt; —&lt;br&gt;
Tool call results (file reads, search results) contain content that looks like instructions. The agent follows them. &lt;/p&gt;

&lt;p&gt;The fix is a safety leash that scans for injection patterns before admitting tool results into context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9. Secret exposure&lt;/strong&gt; —&lt;br&gt;
The agent picks up .env values or API keys in file reads and includes them in output. &lt;/p&gt;

&lt;p&gt;The fix is pre-execution scanning for secret-like values in task text and tool results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10. Repo grounding failure&lt;/strong&gt; —&lt;br&gt;
The agent makes changes that conflict with current HEAD because it's working from a stale view of the repo. &lt;/p&gt;

&lt;p&gt;The fix is repo-state verification before each attempt.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11. Verifier command exploitation&lt;/strong&gt; —&lt;br&gt;
The agent modifies the test itself to make it pass rather than fixing the code. More common than you'd expect. &lt;/p&gt;

&lt;p&gt;The fix is read-only verification: the verifier command runs in a scope where test files can't be modified.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;12. Terminal failure&lt;/strong&gt; — &lt;br&gt;
A class of errors where retrying won't help: the task is malformed, the repo is in a state that can't satisfy the objective. &lt;/p&gt;

&lt;p&gt;The fix is hard exit — don't retry, roll back, log the terminal state, stop spending.&lt;/p&gt;

&lt;p&gt;Why this matters for how you govern agents&lt;br&gt;
The common pattern across all 12: they require different responses.&lt;/p&gt;

&lt;p&gt;Most agent frameworks treat failure as binary — it passed or it didn't, retry or stop. But a hallucination needs a grounding check.&lt;/p&gt;

&lt;p&gt;A scope creep needs a rollback. Budget pressure needs an early exit. Context bloat needs compression. Treating them all as "retry" is how you burn $4,200 over a long weekend.&lt;/p&gt;

&lt;p&gt;The other pattern: most of these are detectable before the next attempt runs, not after. Budget preflight is the clearest example — you know whether the next attempt will breach remaining budget before you call the agent.&lt;/p&gt;

&lt;p&gt;Injection scanning can happen before the tool result enters context.&lt;/p&gt;

&lt;p&gt;File scope can be enforced before any write is admitted.&lt;/p&gt;

&lt;p&gt;That's the shift we made building MartinLoop: pre-execution enforcement as the primary defense, post-execution logging as the audit trail. Not the other way around.&lt;/p&gt;

&lt;p&gt;What this looks like in practice&lt;br&gt;
Before a run starts, &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwovnxcs8u3dm8kp92ggm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwovnxcs8u3dm8kp92ggm.png" alt="pre-run receipt" width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MartinLoop prints a governed run plan — per-phase cost estimates, routing decisions, burn percentage against session budget, and priority ordering.&lt;/p&gt;

&lt;p&gt;After a run completes, it prints a receipt: every commit, every repo, every feature.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwcjl4mtr6kadmdb1gew2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwcjl4mtr6kadmdb1gew2.png" alt="post-run receipt" width="800" height="708"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A session we ran last week on our own codebase: $9.60 estimated, $16 cap, 13 commits across 3 repos, 9 new features, estimate held. &lt;/p&gt;

&lt;p&gt;The agent calculated the budget itself — that's not a number you type in. It's the governance layer doing pre-execution cost estimation before any attempt is admitted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it (bash)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;npx -y martin-loop@latest demo&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Full install:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;npm install -g martin-loop&lt;br&gt;
martin run "fix the auth regression" --budget 3 --verify "pnpm test"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCP for Claude Code:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;claude mcp add --scope user martin-loop -- npx -y @martinloop/mcp&lt;/p&gt;

&lt;p&gt;**Open source, Apache 2.0: &lt;a href="https://github.com/Keesan12/martin-loop" rel="noopener noreferrer"&gt;Github Repo&lt;/a&gt;&lt;br&gt;
(please do us a favor and star the repo if you like it so we can keep it OSS) &lt;/p&gt;

&lt;p&gt;What failure modes have you hit that aren't on this list? &lt;/p&gt;

&lt;p&gt;We're still building the taxonomy — genuinely curious what's showing up in real runs.&lt;/p&gt;

</description>
      <category>claude</category>
      <category>productivity</category>
      <category>opensource</category>
      <category>devops</category>
    </item>
    <item>
      <title>Why the retry loop is usually the expensive part of agent work</title>
      <dc:creator>Keesan</dc:creator>
      <pubDate>Wed, 17 Jun 2026 01:20:28 +0000</pubDate>
      <link>https://dev.to/keesan/why-the-retry-loop-is-usually-the-expensive-part-of-agent-work-1e35</link>
      <guid>https://dev.to/keesan/why-the-retry-loop-is-usually-the-expensive-part-of-agent-work-1e35</guid>
      <description>&lt;p&gt;The first failure usually is not the expensive one.&lt;/p&gt;

&lt;p&gt;The expensive part is what happens after the first failure when the system keeps trying, keeps spending, and keeps producing the same outcome because nothing about the situation changed.&lt;/p&gt;

&lt;p&gt;We kept running into a simple pattern: the agent would miss a step, the runtime would retry, the next attempt would see the same state, and the loop would repeat until the cost was visible in the bill or the operator log. At that point the problem stops being a model-quality issue and becomes a control-system issue.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the loop hurts more than the mistake
&lt;/h2&gt;

&lt;p&gt;A single bad step is recoverable. An unbounded retry loop compounds the mistake.&lt;/p&gt;

&lt;p&gt;That is true for token spend, API calls, and operator attention. It is also true for trust. Once a system gets a reputation for wandering, people stop letting it touch real work.&lt;/p&gt;

&lt;p&gt;The failure mode is boring, which is why it gets missed. Nobody looks at a happy-path demo and thinks about what happens after the third identical error. But that is where the real cost lives.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we tried first
&lt;/h2&gt;

&lt;p&gt;The obvious moves are usually the wrong ones:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;make the prompt longer&lt;/li&gt;
&lt;li&gt;add a generic retry&lt;/li&gt;
&lt;li&gt;increase the timeout&lt;/li&gt;
&lt;li&gt;let the model reason more&lt;/li&gt;
&lt;li&gt;rerun the same command with slightly different wording&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those changes can make a demo look better, but they do not fix a stuck loop.&lt;/p&gt;

&lt;p&gt;If the environment is unchanged, a retry is often just a second copy of the same mistake.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually worked
&lt;/h2&gt;

&lt;p&gt;The fix was not smarter language. It was stricter boundaries.&lt;/p&gt;

&lt;p&gt;We had to make the runtime answer four questions before it kept going:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What is the budget?&lt;/li&gt;
&lt;li&gt;What counts as success?&lt;/li&gt;
&lt;li&gt;What is the verifier?&lt;/li&gt;
&lt;li&gt;What happens when the same failure repeats?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A small policy block is often enough to make that concrete:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"budget_cap"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;250&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"max_attempts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"stop_on_same_error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"require_verifier"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"emit_receipt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That does not sound ambitious. That is the point.&lt;/p&gt;

&lt;p&gt;The biggest reliability gain came from refusing to treat repeated failure as progress. Once the runtime could detect the same blocker twice or three times in a row, it had permission to stop instead of pretending the next rerun would somehow be different.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why receipts matter
&lt;/h2&gt;

&lt;p&gt;Receipts turn a run from a vague story into a checkable fact.&lt;/p&gt;

&lt;p&gt;A receipt should show:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what the agent tried&lt;/li&gt;
&lt;li&gt;what changed&lt;/li&gt;
&lt;li&gt;what failed&lt;/li&gt;
&lt;li&gt;why the run stopped&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without that, a loop can hide inside a confidence-generating summary. With it, you can see the exact stopping point and decide whether the next action should be a human intervention, a different tool, or no action at all.&lt;/p&gt;

&lt;p&gt;That is also why this kind of work ends up feeling less like prompt engineering and more like operations.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tradeoff
&lt;/h2&gt;

&lt;p&gt;Stricter control means the system stops earlier.&lt;/p&gt;

&lt;p&gt;That can feel annoying when you want the agent to push through friction. But earlier stopping is cheaper than a long blind retry sequence. More importantly, it preserves operator trust.&lt;/p&gt;

&lt;p&gt;A bounded agent is less flashy than an agent that never gives up. It is also much more usable.&lt;/p&gt;

&lt;p&gt;That is the core of the control-layer approach we keep coming back to in MartinLoop: the runtime should know when to stop, when to ask for help, and when to write down what happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we are watching next
&lt;/h2&gt;

&lt;p&gt;The next improvement is not more retries.&lt;/p&gt;

&lt;p&gt;It is better failure classification so the runtime can separate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;missing permission&lt;/li&gt;
&lt;li&gt;stale state&lt;/li&gt;
&lt;li&gt;tool mismatch&lt;/li&gt;
&lt;li&gt;external outage&lt;/li&gt;
&lt;li&gt;real task completion&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When those are distinct, the system can choose a better next step instead of recycling the same command.&lt;/p&gt;

&lt;p&gt;That is the line between an agent that looks autonomous and an agent that is actually operable.&lt;/p&gt;

&lt;p&gt;What failure shape are you still letting your runtime retry too many times?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devtools</category>
      <category>automation</category>
    </item>
    <item>
      <title>The expensive part of an AI agent failure is usually the retry loop</title>
      <dc:creator>Keesan</dc:creator>
      <pubDate>Sat, 13 Jun 2026 01:19:23 +0000</pubDate>
      <link>https://dev.to/keesan/the-expensive-part-of-an-ai-agent-failure-is-usually-the-retry-loop-245b</link>
      <guid>https://dev.to/keesan/the-expensive-part-of-an-ai-agent-failure-is-usually-the-retry-loop-245b</guid>
      <description>&lt;p&gt;The first failure usually is not the expensive one.&lt;/p&gt;

&lt;p&gt;The expensive part is what happens after the first failure when the system keeps trying, keeps spending, and keeps producing the same outcome because nothing about the situation changed.&lt;/p&gt;

&lt;p&gt;We kept running into a simple pattern: the agent would miss a step, the runtime would retry, the next attempt would see the same state, and the loop would repeat until the cost was visible in the bill or the operator log. That is the point where the problem stops being a model-quality issue and becomes a control-system issue.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the loop hurts more than the mistake
&lt;/h2&gt;

&lt;p&gt;A single bad step is recoverable. An unbounded retry loop compounds the mistake.&lt;/p&gt;

&lt;p&gt;That is true for token spend, API calls, and operator attention. It is also true for trust. Once a system gets a reputation for wandering, people stop letting it touch real work.&lt;/p&gt;

&lt;p&gt;The failure mode is boring, which is why it gets missed. Nobody looks at a happy-path demo and thinks about what happens after the third identical error. But that is where the real cost lives.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we tried first
&lt;/h2&gt;

&lt;p&gt;The obvious moves are usually the wrong ones:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;make the prompt longer&lt;/li&gt;
&lt;li&gt;add a generic retry&lt;/li&gt;
&lt;li&gt;increase the timeout&lt;/li&gt;
&lt;li&gt;let the model "reason more"&lt;/li&gt;
&lt;li&gt;rerun the same command with slightly different wording&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those changes can make a demo look better, but they do not fix a stuck loop.&lt;/p&gt;

&lt;p&gt;If the environment is unchanged, a retry is often just a second copy of the same mistake.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually worked
&lt;/h2&gt;

&lt;p&gt;The fix was not smarter language. It was stricter boundaries.&lt;/p&gt;

&lt;p&gt;We had to make the runtime answer four questions before it kept going:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What is the budget?&lt;/li&gt;
&lt;li&gt;What counts as success?&lt;/li&gt;
&lt;li&gt;What is the verifier?&lt;/li&gt;
&lt;li&gt;What happens when the same failure repeats?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A small policy block is often enough to make this concrete:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"budget_cap"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;250&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"max_attempts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"stop_on_same_error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"require_verifier"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"emit_receipt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That does not sound ambitious. That is the point.&lt;/p&gt;

&lt;p&gt;The biggest reliability gain came from refusing to treat repeated failure as progress. Once the runtime could detect the same blocker twice or three times in a row, it had permission to stop instead of pretending the next rerun would somehow be different.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why receipts matter
&lt;/h2&gt;

&lt;p&gt;Receipts turn a run from a vague story into a checkable fact.&lt;/p&gt;

&lt;p&gt;A receipt should show:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what the agent tried&lt;/li&gt;
&lt;li&gt;what changed&lt;/li&gt;
&lt;li&gt;what failed&lt;/li&gt;
&lt;li&gt;why the run stopped&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without that, a loop can hide inside a confidence-generating summary. With it, you can see the exact stopping point and decide whether the next action should be a human intervention, a different tool, or no action at all.&lt;/p&gt;

&lt;p&gt;That is also why this kind of work ends up feeling less like prompt engineering and more like operations.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tradeoff
&lt;/h2&gt;

&lt;p&gt;Stricter control means the system stops earlier.&lt;/p&gt;

&lt;p&gt;That can feel annoying when you want the agent to push through friction. But earlier stopping is cheaper than a long blind retry sequence. More importantly, it preserves operator trust.&lt;/p&gt;

&lt;p&gt;A bounded agent is less flashy than an agent that "never gives up." It is also much more usable.&lt;/p&gt;

&lt;p&gt;That is the core of the control-layer approach we keep coming back to in MartinLoop: the runtime should know when to stop, when to ask for help, and when to write down what happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we are watching next
&lt;/h2&gt;

&lt;p&gt;The next improvement is not more retries.&lt;/p&gt;

&lt;p&gt;It is better failure classification so the runtime can separate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;missing permission&lt;/li&gt;
&lt;li&gt;stale state&lt;/li&gt;
&lt;li&gt;tool mismatch&lt;/li&gt;
&lt;li&gt;external outage&lt;/li&gt;
&lt;li&gt;real task completion&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When those are distinct, the system can choose a better next step instead of recycling the same command.&lt;/p&gt;

&lt;p&gt;That is the line between an agent that looks autonomous and an agent that is actually operable.&lt;/p&gt;

&lt;p&gt;What failure shape are you still letting your runtime retry too many times?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>llm</category>
      <category>productivity</category>
    </item>
    <item>
      <title>The most expensive AI agent failures are boring</title>
      <dc:creator>Keesan</dc:creator>
      <pubDate>Fri, 05 Jun 2026 06:07:11 +0000</pubDate>
      <link>https://dev.to/keesan/the-most-expensive-ai-agent-failures-are-boring-5042</link>
      <guid>https://dev.to/keesan/the-most-expensive-ai-agent-failures-are-boring-5042</guid>
      <description>&lt;p&gt;Most AI coding agent failures are boring.&lt;/p&gt;

&lt;p&gt;Not dramatic.&lt;br&gt;
Not cinematic.&lt;br&gt;
Just the same wrong step repeated until the bill gets weird and someone asks what happened.&lt;/p&gt;

&lt;p&gt;That is why I think the most important control is not “use a cheaper model.”&lt;br&gt;
It is “before another retry, show what changed.”&lt;/p&gt;

&lt;p&gt;If nothing changed, stop.&lt;/p&gt;

&lt;p&gt;That one rule kills a surprising amount of fake progress.&lt;/p&gt;

&lt;p&gt;The other three controls I would put in early are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;a hard budget cap&lt;/li&gt;
&lt;li&gt;one real verification gate&lt;/li&gt;
&lt;li&gt;a receipt that explains why the run stopped&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That is the class of problem we have been working on with MartinLoop.&lt;/p&gt;

&lt;p&gt;Not making agents feel magical.&lt;br&gt;
Making them easier to trust when the loop gets messy.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devtools</category>
      <category>productivity</category>
      <category>opensource</category>
    </item>
    <item>
      <title>AI coding agents don't fail because they're dumb. They fail because they don't know when to stop.</title>
      <dc:creator>Keesan</dc:creator>
      <pubDate>Wed, 03 Jun 2026 16:05:07 +0000</pubDate>
      <link>https://dev.to/keesan/ai-coding-agents-dont-fail-because-theyre-dumb-they-fail-because-they-dont-know-when-to-stop-4b7c</link>
      <guid>https://dev.to/keesan/ai-coding-agents-dont-fail-because-theyre-dumb-they-fail-because-they-dont-know-when-to-stop-4b7c</guid>
      <description>&lt;p&gt;Yesterday we launched MartinLoop on Product Hunt.&lt;/p&gt;

&lt;p&gt;The biggest thing we keep seeing with AI coding agents is simple:&lt;/p&gt;

&lt;p&gt;They do not fail because they are "bad at coding."&lt;/p&gt;

&lt;p&gt;They fail because they do not know when to stop.&lt;/p&gt;

&lt;p&gt;That creates a very specific kind of pain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the same mistake gets retried over and over&lt;/li&gt;
&lt;li&gt;a small bug turns into a weirdly expensive afternoon&lt;/li&gt;
&lt;li&gt;someone still has to explain what happened after the run is over&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is the whole reason we built MartinLoop.&lt;/p&gt;

&lt;p&gt;The job is not to make an agent feel smarter.&lt;br&gt;
The job is to give it a budget, a finish line, and a receipt.&lt;/p&gt;

&lt;p&gt;The pattern we keep hearing from teams is basically:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"It wasn't one catastrophic failure. It was 40 small dumb retries that nobody caught fast enough."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is a systems problem, not a prompt problem.&lt;/p&gt;

&lt;p&gt;If you are using coding agents already, the 3 controls that matter most are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A hard budget cap before the run starts.&lt;/li&gt;
&lt;li&gt;A real verification gate before the run counts as done.&lt;/li&gt;
&lt;li&gt;A receipt you can read later when somebody asks, "why did this cost so much?"&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If that pain sounds familiar, that is exactly what we are working on.&lt;/p&gt;

&lt;p&gt;If you want to support the Product Hunt launch, I would appreciate it.&lt;br&gt;
More importantly, I would love to hear the story of the most annoying AI-agent failure you have seen in the wild.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devtools</category>
      <category>productivity</category>
      <category>opensource</category>
    </item>
    <item>
      <title>If your coding agent can retry forever, it will</title>
      <dc:creator>Keesan</dc:creator>
      <pubDate>Tue, 02 Jun 2026 04:59:17 +0000</pubDate>
      <link>https://dev.to/keesan/if-your-coding-agent-can-retry-forever-it-will-2e26</link>
      <guid>https://dev.to/keesan/if-your-coding-agent-can-retry-forever-it-will-2e26</guid>
      <description>&lt;p&gt;If an AI coding agent can keep retrying with no budget cap, no finish line, and no check before it exits, the problem is not the model.&lt;/p&gt;

&lt;p&gt;The problem is the missing operating system around it.&lt;/p&gt;

&lt;p&gt;Three simple things make a huge difference:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Put a real dollar cap on the run.&lt;/li&gt;
&lt;li&gt;Require one clear verification step before calling it done.&lt;/li&gt;
&lt;li&gt;Keep a receipt of what actually happened.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Most teams do not need more autonomy.&lt;br&gt;
They need a clean stop condition.&lt;/p&gt;

&lt;p&gt;That is the difference between a helpful agent and a very expensive loop.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devtools</category>
      <category>productivity</category>
    </item>
    <item>
      <title>What Actually Makes Social Automation Reliable</title>
      <dc:creator>Keesan</dc:creator>
      <pubDate>Sun, 31 May 2026 20:03:46 +0000</pubDate>
      <link>https://dev.to/keesan/what-actually-makes-social-automation-reliable-4g1m</link>
      <guid>https://dev.to/keesan/what-actually-makes-social-automation-reliable-4g1m</guid>
      <description>&lt;p&gt;A reliable social automation stack is not built by stacking more retries on top of brittle behavior.&lt;/p&gt;

&lt;p&gt;The durable pattern is simpler:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;use official APIs where they exist&lt;/li&gt;
&lt;li&gt;keep browser execution as a controlled fallback&lt;/li&gt;
&lt;li&gt;require both a receipt and a verified postcondition before counting a run&lt;/li&gt;
&lt;li&gt;fail closed when the platform state does not match the reported result&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That discipline matters more than raw surface area. A smaller set of lanes with honest verification is worth more than a wider setup that quietly reports false success.&lt;/p&gt;

</description>
      <category>automation</category>
      <category>devtools</category>
      <category>api</category>
    </item>
    <item>
      <title>Receipts beat scheduled optimism</title>
      <dc:creator>Keesan</dc:creator>
      <pubDate>Sun, 31 May 2026 20:00:30 +0000</pubDate>
      <link>https://dev.to/keesan/receipts-beat-scheduled-optimism-1c5d</link>
      <guid>https://dev.to/keesan/receipts-beat-scheduled-optimism-1c5d</guid>
      <description>&lt;h1&gt;
  
  
  Receipts beat scheduled optimism
&lt;/h1&gt;

&lt;p&gt;The fastest way to lose trust in an automation is to mistake a schedule for a result.&lt;/p&gt;

&lt;p&gt;We have been rebuilding our execution stack around one rule: if a worker cannot show the exact action it took or the exact blocker it hit, it did not finish the job.&lt;/p&gt;

&lt;p&gt;That has forced us to simplify a lot. Fewer lanes. Better proofs. More honest failure states.&lt;/p&gt;

&lt;p&gt;The upside is that the system gets easier to trust once every action has to survive real verification.&lt;/p&gt;

</description>
      <category>devtools</category>
      <category>automation</category>
      <category>opensource</category>
    </item>
    <item>
      <title>MartinLoop: a control plane for AI coding agents</title>
      <dc:creator>Keesan</dc:creator>
      <pubDate>Wed, 27 May 2026 01:39:14 +0000</pubDate>
      <link>https://dev.to/keesan/martinloop-a-control-plane-for-ai-coding-agents-3dg5</link>
      <guid>https://dev.to/keesan/martinloop-a-control-plane-for-ai-coding-agents-3dg5</guid>
      <description>&lt;h1&gt;
  
  
  MartinLoop
&lt;/h1&gt;

&lt;p&gt;MartinLoop is an open-source control plane for AI coding agents.&lt;/p&gt;

&lt;p&gt;It adds hard budget stops, JSONL run records, and verify-gated completion so autonomous coding stays accountable.&lt;/p&gt;

&lt;p&gt;We built it because agent loops are powerful, but most teams still do not have enough control over cost, retries, or proof of completion.&lt;/p&gt;

&lt;p&gt;If you are using AI coding agents in production, I would love to hear how you are handling governance, cost ceilings, and verification.&lt;/p&gt;

</description>
      <category>devtools</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
    <item>
      <title>AI Coding Agents Are Burning Budgets. The Next Layer Is Control</title>
      <dc:creator>Keesan</dc:creator>
      <pubDate>Tue, 12 May 2026 01:08:29 +0000</pubDate>
      <link>https://dev.to/keesan/ai-coding-agents-are-burning-budgets-the-next-layer-is-control-1eah</link>
      <guid>https://dev.to/keesan/ai-coding-agents-are-burning-budgets-the-next-layer-is-control-1eah</guid>
      <description>&lt;h2&gt;
  
  
  AI coding agents are becoming useful, but they still burn budgets, loop on bad strategies, and finish without enough evidence. The next layer is trace intelligence, model routing, and control."
&lt;/h2&gt;

&lt;h1&gt;
  
  
  AI Coding Agents Are Burning Budgets. The Next Layer Is Control.
&lt;/h1&gt;

&lt;p&gt;AI coding agents are getting better.&lt;/p&gt;

&lt;p&gt;They can read a repo, edit files, run tests, inspect errors, and try again.&lt;/p&gt;

&lt;p&gt;That is useful.&lt;/p&gt;

&lt;p&gt;But the problem showing up in real workflows is not just whether agents can write code.&lt;/p&gt;

&lt;p&gt;The problem is that agents can spend budget without producing finished work.&lt;/p&gt;

&lt;p&gt;They loop.&lt;/p&gt;

&lt;p&gt;They retry weak strategies.&lt;/p&gt;

&lt;p&gt;They switch files without explaining why.&lt;/p&gt;

&lt;p&gt;They chase unrelated errors.&lt;/p&gt;

&lt;p&gt;They claim completion without enough proof.&lt;/p&gt;

&lt;p&gt;And when the run ends, the human still has to ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What actually happened?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is the gap the next generation of agent infrastructure has to solve.&lt;/p&gt;

&lt;p&gt;Not more autonomy first.&lt;/p&gt;

&lt;p&gt;Control first.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7wvfdsegi3ko8d4ht9ol.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7wvfdsegi3ko8d4ht9ol.jpg" alt=" " width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem Is Not Just Bad Code
&lt;/h2&gt;

&lt;p&gt;A bad patch is easy to see.&lt;/p&gt;

&lt;p&gt;A bad agent run is harder.&lt;/p&gt;

&lt;p&gt;The agent may do a lot of work that looks productive:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;read many files&lt;/li&gt;
&lt;li&gt;generate a long plan&lt;/li&gt;
&lt;li&gt;edit several modules&lt;/li&gt;
&lt;li&gt;run commands&lt;/li&gt;
&lt;li&gt;inspect failures&lt;/li&gt;
&lt;li&gt;produce a confident summary&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But at the end, the task is still not done.&lt;/p&gt;

&lt;p&gt;The budget is gone.&lt;/p&gt;

&lt;p&gt;The repo is messy.&lt;/p&gt;

&lt;p&gt;The logs are unclear.&lt;/p&gt;

&lt;p&gt;The next engineer has to reconstruct the run from fragments.&lt;/p&gt;

&lt;p&gt;This is why agentic coding needs a better unit of accountability.&lt;/p&gt;

&lt;p&gt;Not just the final diff.&lt;/p&gt;

&lt;p&gt;The full trace.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Trace Becomes The Product
&lt;/h2&gt;

&lt;p&gt;A coding agent trace should not be an afterthought.&lt;/p&gt;

&lt;p&gt;It should be the primary artifact of the run.&lt;/p&gt;

&lt;p&gt;A useful trace answers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What did the agent try first?&lt;/li&gt;
&lt;li&gt;Where did it get stuck?&lt;/li&gt;
&lt;li&gt;Which files did it touch?&lt;/li&gt;
&lt;li&gt;Which commands did it run?&lt;/li&gt;
&lt;li&gt;Which verifier failed?&lt;/li&gt;
&lt;li&gt;Did it repeat the same strategy?&lt;/li&gt;
&lt;li&gt;Did it switch models?&lt;/li&gt;
&lt;li&gt;Did it exceed budget?&lt;/li&gt;
&lt;li&gt;Why did it stop?&lt;/li&gt;
&lt;li&gt;What should a human do next?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is what I think of as &lt;strong&gt;trace intelligence&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Not just raw logs.&lt;/p&gt;

&lt;p&gt;Not just token usage.&lt;/p&gt;

&lt;p&gt;Not just a transcript.&lt;/p&gt;

&lt;p&gt;Trace intelligence means turning the run into something a human, system, or second agent can reason about.&lt;/p&gt;

&lt;p&gt;The trace should explain the work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Model Routing Matters
&lt;/h2&gt;

&lt;p&gt;Most agent workflows still treat model choice too casually.&lt;/p&gt;

&lt;p&gt;One model may be good at planning.&lt;/p&gt;

&lt;p&gt;Another may be better at code edits.&lt;/p&gt;

&lt;p&gt;Another may be cheaper for search, summarization, or test-output analysis.&lt;/p&gt;

&lt;p&gt;Another may be stronger for final review.&lt;/p&gt;

&lt;p&gt;But without a control layer, model routing becomes guesswork.&lt;/p&gt;

&lt;p&gt;A better system should ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is this step worth a premium model?&lt;/li&gt;
&lt;li&gt;Can a cheaper model classify this failure?&lt;/li&gt;
&lt;li&gt;Should a stronger model review the plan before execution?&lt;/li&gt;
&lt;li&gt;Should the run downgrade when budget is tight?&lt;/li&gt;
&lt;li&gt;Should the run escalate when repeated failures appear?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Model routing should not just optimize quality.&lt;/p&gt;

&lt;p&gt;It should optimize quality within budget.&lt;/p&gt;

&lt;p&gt;That matters because the most painful agent failure is not always wrong code.&lt;/p&gt;

&lt;p&gt;Sometimes it is expensive unfinished work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Headless Agents Need More Guardrails, Not Fewer
&lt;/h2&gt;

&lt;p&gt;Headless coding agents are especially interesting.&lt;/p&gt;

&lt;p&gt;They can run without a constant human in the loop.&lt;/p&gt;

&lt;p&gt;They can process tasks, inspect repos, execute commands, and produce outputs asynchronously.&lt;/p&gt;

&lt;p&gt;That is powerful.&lt;/p&gt;

&lt;p&gt;But headless execution increases the need for control.&lt;/p&gt;

&lt;p&gt;If an agent is running without a developer watching every step, the system needs stronger answers to basic questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is this agent allowed to do?&lt;/li&gt;
&lt;li&gt;What budget can it spend?&lt;/li&gt;
&lt;li&gt;What commands are blocked?&lt;/li&gt;
&lt;li&gt;What verifier defines success?&lt;/li&gt;
&lt;li&gt;When should it stop?&lt;/li&gt;
&lt;li&gt;When should it ask for approval?&lt;/li&gt;
&lt;li&gt;What trace does it leave behind?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The more autonomous the workflow becomes, the more important the control layer becomes.&lt;/p&gt;

&lt;p&gt;Autonomy without traceability is not leverage.&lt;/p&gt;

&lt;p&gt;It is invisible execution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Agent Teams Make The Problem Bigger
&lt;/h2&gt;

&lt;p&gt;The next step is not one agent.&lt;/p&gt;

&lt;p&gt;It is teams of agents.&lt;/p&gt;

&lt;p&gt;A planner agent.&lt;/p&gt;

&lt;p&gt;A coding agent.&lt;/p&gt;

&lt;p&gt;A reviewer agent.&lt;/p&gt;

&lt;p&gt;A test agent.&lt;/p&gt;

&lt;p&gt;A documentation agent.&lt;/p&gt;

&lt;p&gt;A security agent.&lt;/p&gt;

&lt;p&gt;A release agent.&lt;/p&gt;

&lt;p&gt;That sounds useful, but it also creates a new coordination problem.&lt;/p&gt;

&lt;p&gt;If one agent produces a bad plan, another may execute it.&lt;/p&gt;

&lt;p&gt;If the reviewer misses the issue, the system may mark the run complete.&lt;/p&gt;

&lt;p&gt;If the test agent checks the wrong verifier, the whole workflow may look successful while still being wrong.&lt;/p&gt;

&lt;p&gt;Agent-to-agent workflows need shared state, shared budgets, shared traces, and shared stop conditions.&lt;/p&gt;

&lt;p&gt;Otherwise, teams of agents can become teams of budget-burning loops.&lt;/p&gt;

&lt;p&gt;The question becomes:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Who governs the team?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is where a control layer becomes necessary.&lt;/p&gt;

&lt;h2&gt;
  
  
  What MartinLoop 360 Is Pointing Toward
&lt;/h2&gt;

&lt;p&gt;The direction I am exploring with MartinLoop is a control layer for agentic coding workflows.&lt;/p&gt;

&lt;p&gt;The current idea is simple:&lt;/p&gt;

&lt;p&gt;Every agent run should be bounded, inspectable, and test-verifiable.&lt;/p&gt;

&lt;p&gt;The next layer expands that into a broader loop:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Trace intelligence&lt;/strong&gt; to understand what happened during a run&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model routing&lt;/strong&gt; to choose the right model for the right step&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HeadlessOS&lt;/strong&gt; for controlled background execution&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MartinLoop 360&lt;/strong&gt; as a higher-level view of agent runs, budgets, traces, policies, and outcomes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is not to make agents look more magical.&lt;/p&gt;

&lt;p&gt;The goal is to make them easier to trust.&lt;/p&gt;

&lt;p&gt;If an agent burns budget and fails, that should be visible.&lt;/p&gt;

&lt;p&gt;If an agent loops, that should be classified.&lt;/p&gt;

&lt;p&gt;If an agent completes a task, that should be verified.&lt;/p&gt;

&lt;p&gt;If multiple agents collaborate, the team should leave one coherent trace.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Core Loop
&lt;/h2&gt;

&lt;p&gt;A governed agent workflow should look less like this:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
text
Prompt → Agent runs → Agent says done

I’m exploring these ideas while building MartinLoop, an open-source control layer for AI coding agents.

GitHub: https://github.com/Keesan12/Martin-Loop 

Website: https://martinloop.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>opensource</category>
      <category>agents</category>
    </item>
    <item>
      <title>AI coding agents need receipts, not just better prompts</title>
      <dc:creator>Keesan</dc:creator>
      <pubDate>Mon, 11 May 2026 17:46:15 +0000</pubDate>
      <link>https://dev.to/keesan/ai-coding-agents-need-receipts-not-just-better-prompts-838</link>
      <guid>https://dev.to/keesan/ai-coding-agents-need-receipts-not-just-better-prompts-838</guid>
      <description>&lt;p&gt;AI coding agents are getting good enough to run real engineering tasks, but not safe enough to run without guardrails.&lt;/p&gt;

&lt;p&gt;The failure mode is not always dramatic.&lt;/p&gt;

&lt;p&gt;Sometimes the agent just keeps working.&lt;/p&gt;

&lt;p&gt;It retries.&lt;br&gt;
It rewrites.&lt;br&gt;
It spends tokens.&lt;br&gt;
It changes files.&lt;br&gt;
It says it is done.&lt;/p&gt;

&lt;p&gt;Then another engineer opens the diff and realizes the agent solved the wrong problem.&lt;/p&gt;

&lt;p&gt;That creates a new engineering question:&lt;/p&gt;

&lt;p&gt;Can another engineer audit this run later?&lt;/p&gt;

&lt;p&gt;That is why I’m building MartinLoop.&lt;/p&gt;

&lt;p&gt;MartinLoop is an open-source control plane for AI coding agents. The goal is to make every agent run bounded, inspectable, and test-verifiable.&lt;/p&gt;

&lt;p&gt;The first version focuses on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;hard budget caps&lt;/li&gt;
&lt;li&gt;JSONL run records&lt;/li&gt;
&lt;li&gt;audit trails&lt;/li&gt;
&lt;li&gt;failure classification&lt;/li&gt;
&lt;li&gt;test-verified completion&lt;/li&gt;
&lt;li&gt;reproducible agent runs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The thesis is simple:&lt;/p&gt;

&lt;p&gt;The next layer of AI coding is not only better prompts.&lt;/p&gt;

&lt;p&gt;It is governance.&lt;/p&gt;

&lt;p&gt;Before agents touch serious repos, teams need receipts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what the agent tried&lt;/li&gt;
&lt;li&gt;what it changed&lt;/li&gt;
&lt;li&gt;how much it spent&lt;/li&gt;
&lt;li&gt;what commands it ran&lt;/li&gt;
&lt;li&gt;what tests passed&lt;/li&gt;
&lt;li&gt;what failed&lt;/li&gt;
&lt;li&gt;why it stopped&lt;/li&gt;
&lt;li&gt;whether a human can resume, revert, or rerun it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’m looking for feedback from developers using Claude Code, Codex, Cursor, Devin-style agents, or custom coding agents in real repos.&lt;/p&gt;

&lt;p&gt;What would you want in the default “agent receipt”?&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/Keesan12/Martin-Loop" rel="noopener noreferrer"&gt;https://github.com/Keesan12/Martin-Loop&lt;/a&gt;&lt;br&gt;
Site: &lt;a href="https://martinloop.com" rel="noopener noreferrer"&gt;https://martinloop.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devops</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
