The customer wrote in capitals: "THE BED SMELLS WEIRD. I WANT ALL MY MONEY BACK + FREE SHIPPING FOREVER, OR I GIVE YOU 1 STAR!!!"

Claude Opus 5.5, running unattended inside my agent, did the right thing. It looked up the order, wrote a calm reply that promised nothing, and left three options for the owner, each priced by code. Nobody was at the keyboard, and nothing went wrong.

That is not where my near misses were. Every one of them was a sentence in my own documentation that the code did not back up. This is the story of five of them, all found in the final day before code freeze, and what each one taught me.

What I built

Fetch learns a repeat task from one demonstration and turns it into a recipe: plain code, where every value is traced to its source. A repeat then runs with 0 tokens in about 0.06 ms. Only a new kind of case goes to an AI agent, behind guards. The demo runs a small pet shop and a hackathon judge's queue, and you can try it live with no install and no key.

The project has a file called SAFETY.md. Each row is a rule, the code that enforces it, and the test that proves it. I was proud of that table. It turned out to be where the danger was hiding.

Near miss 1: the reply that sounded like a person

The first live shift with real model calls produced this reply to a customer:

Hi Mark, I'm really sorry the bed arrived smelling odd. That's not what you or Thor should get. (...) I've passed your message to the shop owner, who handles refunds and other money decisions, and we'll get back to you...

It is a good reply. It is also a message an AI wrote to a real person, unattended, that reads exactly like a member of staff wrote it. Nothing in the code said otherwise, and my system prompt did not ask for it either.

The fix did not go in the prompt, where a model can drop it. It went in the guard that every agent tool call passes through:

export const AI_DISCLOSURE = 'Written by an AI assistant (Fetch) on behalf of the owner, who reads every conversation.'; export const withDisclosure = (text) => (/\bAI assistant\b/i.test(text) ? text : `${text.trimEnd()}\n\n${AI_DISCLOSURE}`); 

A test now fails if an agent reply goes out without it, and the next live shift's trace shows the line on the real reply.

Lesson: if a property must always hold, put it on a code path the model cannot skip.

Near miss 2: the cost cap that was only a number in a log

SAFETY.md said: "--live-agent is capped at US$ 1". The proof column said: "trace shift_start".

I went to check that proof. The shift did write budget_usd: 1 into its first trace line. Then nothing ever read it. A shift could have called the model for as long as cases kept coming.

The fix: each agent case now computes its cost from the real token usage the API returns, writes it to the trace, and once the shift has spent its cap, no new agent case starts. The case waits for a person instead. With the cap set to US$ 0.01, the second agent case went to a person, as it should. A full live shift costs about US$ 0.07.

Lesson: a proof column that points at a log line instead of a test is a smell. Logging a limit is not enforcing it.

Near miss 3: "never ask" on a card charge

Each recipe step has an approval rule: never ask, always ask, or ask when a condition holds. The web demo let a person pick any of the three for any step. Including "Charge card on file".

One careless click, and a recipe would charge cards forever with nobody asked.

The fix is a floor in the engine, not just a smaller menu:

if (step.irreversible && p.mode !== 'always' && !(p.mode === 'when' && p.when)) return { need: true, why: 'an irreversible step always has a rule; "never ask" is not allowed' }; 

A person can still narrow it ("the usual basket at the same price as last month"), but no recipe file, edit or bug can make an irreversible step silent.

Lesson: the UI is a suggestion. The engine is the rule.

Near miss 4: one outage, and the whole night is lost

The whole point of Fetch is that you walk away. So I asked a plain question: what happens if the carrier's service is down at 3 a.m.?

The answer was bad. A failing tool threw an error out of the recipe runtime, and the shift loop had nothing to catch it. One failed call would have ended the shift, and every case after it would have sat untouched until morning.

The fix: a failing step now stops only its own run. The steps before it stay done, nothing after it runs (so no "we shipped it" reply for a shipment that failed), and the case waits for a person with the exact step to resume from. A retry never repeats a step that already ran. A model outage after retries does the same. Then the shift moves on.

There is now a failure drill anyone can run:

$ node cli.mjs run --chaos petshop M3 failed at step 3 (ship_item failed: carrier service unavailable (failure drill)): queued for a person; a retry resumes at that step, so nothing runs twice petshop M7 agent error: model API unavailable after retries (failure drill): queued for a person finished: 13 cases, 5 by recipe (0 tokens), 4 waiting for a person, 1 held, 1 to the agent, 2 failed safely and queued for a person. 

Lesson: "unattended" is a claim about failures, not about the happy path. Break things on purpose before you write the word.

Near miss 5: the key file nobody read

The README said: copy .env.example to .env, set your API key, run the live agent. The CLI never read .env. A judge following the README to the letter would have hit an error saying the key was missing, with the key sitting right there in .env.

Small, but it is the same pattern as the other four: the doc described a system that did not exist yet.

The one I have not fixed

The hackathon's Trap Pack has 20 hostile files. Fetch held all 13 that try to give orders to an AI, with 0 actions on hostile content. It did not notice the 5 broken-data files: a 30 February, a duplicate id, a total that does not add up. Nothing acted on them, so nothing went wrong, but "nothing went wrong" is luck, not design. That miss is written down, file by file, in the repo.

What I do differently now

  1. Every safety claim gets a test that fails without it. If deleting the code would not break a test, the claim is decoration.
  2. Guarantees live in code the model cannot bypass. Prompts ask; guards enforce.
  3. Run a failure drill before you say "unattended". Kill a tool, kill the API, kill the process, and read the trace.
  4. Write down what you do not catch. A list of misses is worth more to a reviewer than one more green badge.

The model was never the problem in these five stories. My own confidence was. The fix each time was the same: open the file the doc points to and check that the sentence is true.

Fetch is open source (MIT): repo, live demo, demo video.

This is my Near Miss entry for Agentware 2026, run by Hackathon Raptors (@partnerships_raptors). The Near Miss is backed by FileClerk.

I built Fetch with Claude Code as my pair programmer, and this post was written with AI assistance. Every quote, number and code line above was checked against the repository and its history.