<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[SelfHealing]]></title><description><![CDATA[SelfHealing]]></description><link>https://selfhealing.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 24 Oct 2026 13:29:26 GMT</lastBuildDate><atom:link href="https://selfhealing.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Your AI Agent Got Better at One Thing and Worse at Five: A No-Code Way to Catch Regressions]]></title><description><![CDATA[You tweak a prompt, try three examples, and the agent looks better. Ship it. A week later a customer tells you it stopped asking for order numbers, or…]]></description><link>https://selfhealing.hashnode.dev/your-ai-agent-got-better-at-one-thing-and-worse-at-five-a-no-code-way-to-catch-regressions</link><guid isPermaLink="true">https://selfhealing.hashnode.dev/your-ai-agent-got-better-at-one-thing-and-worse-at-five-a-no-code-way-to-catch-regressions</guid><category><![CDATA[AI]]></category><category><![CDATA[ai agents]]></category><category><![CDATA[llm]]></category><category><![CDATA[Testing]]></category><dc:creator><![CDATA[SelfHealing]]></dc:creator><pubDate>Thu, 22 Oct 2026 07:15:44 GMT</pubDate><content:encoded><![CDATA[<p>You tweak a prompt, try three examples, and the agent looks better. Ship it. A week later a customer tells you it stopped asking for order numbers, or started calling the refund tool twice. Nobody tested that, because nobody wrote it down.</p>
<p>That is the most common way small teams break their own agents. Here is a lightweight process that catches most of it without writing code.</p>
<h2>1. Read real runs before you write any tests</h2>
<p>Open the last 30 conversations or task runs of one agent and write one line per failure: what went wrong, in plain words. Don't categorise yet. After 30 runs you'll see the same handful of problems again and again: missing information it should have asked for, a tool called with the wrong arguments, an answer that sounds confident but isn't in your docs, a tone problem.</p>
<p>Those clusters are your test categories. They come from your agent, not from a generic checklist.</p>
<h2>2. Turn each failure into a test case</h2>
<p>A test case is just four columns in a sheet: the input, what a good result must include, what it must never do, and the category. Aim for 20 to 40 cases to start, mostly from real failures plus a few happy paths and a few nasty edge cases (empty input, conflicting instructions, a tool that times out).</p>
<h2>3. Use simple checks first, AI judges second</h2>
<p>Anything you can check with a rule, check with a rule: did it call the right tool, include the order number, stay under the length limit. For fuzzy things like "is this grounded in our help docs", use an AI judge prompt that answers only PASS or FAIL with a one-line reason.</p>
<p>Then calibrate the judge: grade 20 outputs yourself, run the judge on the same 20, and compare. If it misses real failures, fix the judge prompt before trusting it.</p>
<h2>4. Compare every change against a baseline</h2>
<p>Run the full test set on the current version and save the results. Before any prompt, model, tool or knowledge change, run it again on the new version and compare category by category. The total pass rate can go up while one category quietly drops. That category is the bug your customer would have found.</p>
<p>A simple release rule works well: block the change if any critical case fails, or if any category drops by more than a set amount. Otherwise ship.</p>
<h2>5. Keep the loop going weekly</h2>
<p>Every week, read a fresh batch of real runs, add new failures as test cases, and re-run. The test set grows with your agent, and regressions stop reaching customers.</p>
<h2>Tools to start with</h2>
<p>If you want something running today, the free <a href="https://selfhealingkit.gumroad.com/l/ai-agent-watchdog">AI Agent Watchdog</a> is a copy-paste prompt that checks what your agents actually produced, plus a two-minute daily checklist, so you catch an agent that quietly stopped within a day. For the full setup, with 12 failure runbooks, agent contracts and approval gates, see the <a href="https://selfhealingkit.gumroad.com/l/self-healing-agent-kit">Self-Healing Agent Team Kit</a>.</p>
<p>Evals reduce risk; they don't guarantee an agent is correct. Keep a human approval step for anything you can't undo.</p>
]]></content:encoded></item><item><title><![CDATA[Why Your AI Agents Fail Silently (and How to Catch It Within a Day)]]></title><description><![CDATA[Most AI agent failures never throw an error. Five failure classes, their signatures, and an output-based setup that catches them within 24 hours.]]></description><link>https://selfhealing.hashnode.dev/why-your-ai-agents-fail-silently-and-how-to-catch-it-within-a-day</link><guid isPermaLink="true">https://selfhealing.hashnode.dev/why-your-ai-agents-fail-silently-and-how-to-catch-it-within-a-day</guid><category><![CDATA[AI]]></category><category><![CDATA[agents]]></category><category><![CDATA[automation]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[SelfHealing]]></dc:creator><pubDate>Tue, 20 Oct 2026 11:26:38 GMT</pubDate><content:encoded><![CDATA[<p>Your agents worked great in week one. One drafted social posts, one compiled a research pack every Monday, one tidied up the CRM. By week four, a familiar routine has set in: every morning you open each agent's output folder to check which one quietly stopped.</p>
<p>Nothing turned red. No alert fired. The scheduler says every run "succeeded". And yet the Monday research pack is half a page of filler, and the social drafts are still promoting a campaign that ended two weeks ago.</p>
<p>This is the normal way AI agents fail. Not with a crash, but with a clean exit and a useless output. This article breaks down why that happens, how to recognise each kind of silent failure, and the minimum setup that catches them within a day instead of a week.</p>
<h2>Agents rarely fail because the model got worse</h2>
<p>When an agent's output degrades, the first instinct is to blame the model or rewrite the prompt. Usually neither is the cause. Agents fail because the world around them moved: a token expired, a spreadsheet changed, a routine was paused and forgotten.</p>
<p>Almost every failure lands in one of five classes. Knowing which class you are looking at tells you where to look and who has to fix it.</p>
<h3>1. Access failures</h3>
<p>A login expired. An OAuth token was revoked. Someone changed a password. An API key hit its spending cap. A connector needs re-authorisation after the provider changed its policy.</p>
<p><strong>Signature:</strong> the run starts, then errors on the first real action. You see a 401, a 403, a "please reconnect your account" message, or, worse, an empty result where there should be data.</p>
<p>Access failures are the loudest of the five, which makes them the easiest. The trap is the "empty result" variant: some connectors return nothing instead of an error when they lose access, and the agent cheerfully reports "no new items today".</p>
<h3>2. Input failures</h3>
<p>The thing the agent reads changed shape. A column was renamed from <code>Company</code> to <code>Company name</code>. A folder moved. A website the agent scrapes was redesigned. An inbox filter started routing mail somewhere else. A source feed simply went quiet.</p>
<p><strong>Signature:</strong> the run "succeeds", but the output is thin, empty, or about the wrong thing.</p>
<p>This is the most dangerous class, because language models are very good at producing plausible text from bad input. An agent that can't find the column it expects will often improvise rather than stop.</p>
<h3>3. Capacity failures</h3>
<p>Rate limits, quotas, credits, a full disk, a timeout, or a context window that overflowed because a memory file has been growing for three months.</p>
<p><strong>Signature:</strong> intermittent. Works on Monday, fails on Thursday, works again on Friday. Failures cluster at the same time of day, often because several agents hit the same provider in the same minute.</p>
<h3>4. Instruction drift</h3>
<p>The prompt has been edited by three people (or by the agent itself) and now contradicts itself. The brief says "post daily", the brand guide says "never post on weekends". A memory file contains a stale fact that quietly overrides the instructions.</p>
<p><strong>Signature:</strong> quality declines slowly. Tone wanders. The agent alternates between two behaviours, or starts asking questions it used to know the answer to.</p>
<h3>5. Coordination failures</h3>
<p>Two agents write to the same file. A downstream agent depends on an upstream one that stopped. A routine was paused for a holiday and never resumed. Nobody owns the agent anymore.</p>
<p><strong>Signature:</strong> gaps. A missing weekly report. A research pack built on last month's data.</p>
<h2>The core problem: you are monitoring the wrong thing</h2>
<p>Look at the signatures again. Only access failures reliably produce an error. Input failures, instruction drift, and coordination failures produce <strong>no error messages at all</strong>. Capacity failures produce errors only some of the time.</p>
<p>If your only alerting is "the run crashed", you will miss most of your real failures.</p>
<p>Traditional software monitoring checks exit codes, because in traditional software a wrong result usually comes from a bug that also throws. Agents break that assumption. The worst agent failures exit cleanly with a confident, well-formatted, wrong answer.</p>
<p>So the fix is a change in what you check:</p>
<blockquote>
<p><strong>Check outputs, not exit codes.</strong></p>
</blockquote>
<p>That means for every agent you need an answer to a question most setups never write down: <em>what does a good output look like, concretely enough that something other than you can check it?</em></p>
<h2>A minimal setup that catches silent failures</h2>
<p>You don't need a monitoring platform. You need three plain-text things, and you can set them up in an afternoon.</p>
<h3>Step 1: Write down what "done" means for each agent</h3>
<p>For every agent, write three to five checkable criteria. "Checkable" means another agent could verify each one by reading the output, without judgement calls.</p>
<p>Bad: "Produces a good research summary."</p>
<p>Good:</p>
<pre><code>Done means:
1. A file exists at /research/output/YYYY-MM-DD.md dated today.
2. It contains at least 5 items.
3. Every item has a source URL.
4. No item is older than 7 days.
5. Total length is between 600 and 1,500 words.
</code></pre>
<p>Add an <strong>expected output size</strong> range. Size is a crude signal, but it is an extremely effective one. A research pack that is normally 1,000 words and suddenly comes in at 180 is almost always a broken input, not a slow news week.</p>
<p>If you can't write "done means" for an agent, that's a finding in itself: the agent can't hit a target nobody defined, and nothing can check it.</p>
<h3>Step 2: Make every agent write one line per run</h3>
<p>Create a single run log that every agent appends to at the end of every run. Same columns for all of them:</p>
<pre><code>timestamp_iso,agent_name,routine,status,output_path,output_size,notes
2026-10-19T08:02:11+02:00,research,weekly-pack,ok,/research/output/2026-10-19.md,1043,
2026-10-19T08:15:40+02:00,social,drafts,partial,/social/drafts/2026-10-19.md,212,"source sheet missing column 'Campaign'"
</code></pre>
<p>Then add this to each agent's instructions:</p>
<pre><code>At the end of every run, append one line to {RUN_LOG_PATH}:
timestamp_iso,agent_name,routine,status(ok|partial|failed),output_path,output_size,notes

"Done" means: {DONE_MEANS}. If you cannot meet all of them, set
status=partial and say which criterion failed in notes.

If an input is missing, empty, or has a different shape than described
here, do not guess. Set status=failed and describe what you saw in notes.
</code></pre>
<p>That last paragraph matters more than it looks. It turns the most dangerous failure class (input changed shape, agent improvises) into a visible one. You are explicitly giving the agent permission to fail loudly instead of producing filler.</p>
<p>The run log turns "I think the research bot stopped" into "the research agent's last successful run was 6 days ago and its last three outputs were under 200 words". That is a sentence you can act on.</p>
<h3>Step 3: Check the log daily, with something other than your eyes</h3>
<p>Once the log exists, checking it is mechanical. For each agent, compare the log against its definition of done:</p>
<ul>
<li><strong>Overdue?</strong> Is the last successful run older than the agent's cadence? An agent with no log line for twice its cadence is almost certainly paused, disabled, or broken.</li>
<li><strong>Failing?</strong> What were the statuses of the last three runs?</li>
<li><strong>Missing?</strong> Does the latest output actually exist at the path the agent claims?</li>
<li><strong>Thin?</strong> Is the latest output size inside the expected range?</li>
<li><strong>Wrong?</strong> Does it meet each "done means" criterion?</li>
<li><strong>Trending down?</strong> Is output size falling across the last five runs, even if each run individually passes? A 30%+ drop over five runs is worth a look.</li>
</ul>
<p>You can do this by hand in a few minutes with a spreadsheet filter. Better: hand it to a small, scheduled, read-only agent whose only job is this check. That's usually called a watchdog, and it deserves its own article (it gets one in this series).</p>
<h2>Diagnosing what you find</h2>
<p>When a check flags an agent, classify the cause before fixing anything. The class tells you who can fix it:</p>
<table>
<thead>
<tr>
<th>Class</th>
<th>Typical evidence</th>
<th>Who fixes it</th>
</tr>
</thead>
<tbody><tr>
<td>Access</td>
<td>401/403, "reconnect", empty result from a working source</td>
<td>A human re-authorises the connector</td>
</tr>
<tr>
<td>Input</td>
<td>Thin output, notes mention missing columns or moved files</td>
<td>A human approves the new input shape</td>
</tr>
<tr>
<td>Capacity</td>
<td>429s, quota messages, timeouts at the same hour</td>
<td>Often automatic: wait and retry, or stagger schedules</td>
</tr>
<tr>
<td>Instruction drift</td>
<td>Wandering tone, two rules that disagree</td>
<td>A human edits the instructions</td>
</tr>
<tr>
<td>Coordination</td>
<td>Overdue runs, stale upstream data, overlapping write paths</td>
<td>A human resumes schedules or splits paths</td>
</tr>
</tbody></table>
<p>Notice how few of those an agent should fix by itself. A useful rule of thumb: <strong>fix automatically only if the fix is reversible, stays inside the agent's own workspace, and doesn't need anyone's permission.</strong> One retry after a timeout qualifies. Re-authorising an account, editing instructions, or rescheduling a routine does not.</p>
<h2>Three habits that prevent the next one</h2>
<p>Catching silent failures quickly is half the job. These three habits stop the most common ones from recurring:</p>
<ol>
<li><strong>Date every fact in agent memory.</strong> "As of 2026-10: pricing page is /pricing" ages honestly. "Pricing page is /pricing" lies forever. Give memory files a size budget, too; a notes file that has grown for three months is a common source of both drift and context overflow.</li>
<li><strong>Write the resume date when you pause anything.</strong> Holiday pauses are one of the easiest ways to lose an agent for weeks.</li>
<li><strong>Give every agent a single owner and a kill rule.</strong> For example: "pause if no output has been used by a human in 14 days". Without one, dead agents keep running and keep costing money.</li>
</ol>
<h2>The 60-minute version</h2>
<p>If you only have an hour today:</p>
<ol>
<li>Pick your most important agent and write its "done means" and expected output size. (15 minutes)</li>
<li>Add the run-log instruction above to its prompt. (15 minutes)</li>
<li>Tomorrow morning, check the log against the criteria instead of reading the output. (30 minutes the first time, a couple of minutes after that)</li>
</ol>
<p>That alone moves you from finding out about failures when a post doesn't go out, to finding out the next morning.</p>
<hr />
<p><em>Next in this series: a copy-paste watchdog prompt that runs this check for you every morning.</em></p>
]]></content:encoded></item></channel></rss>