Agent Fleet Notes

Lessons

18 engineering lessons from building and running a fleet of AI (artificial intelligence) agents. Each one has the failure as it was seen, the cause underneath it, the fix, the general principle, and one other place the same principle shows up, so it transfers to problems that have nothing to do with agents.

  1. Queued is not delivered
  2. Silence from a probe is not absence
  3. Failure paths hide failures
  4. A lexer pass is not a syntax check
  5. A clock change broke statements about the schedule, not the schedule
  6. An approval gate nobody asked for stalls a pipeline
  7. Monitors watch the last incident
  8. A full disk makes empty files, not errors
  9. Staying up is not supervision
  10. Match the field, not the text
  11. One thing, one spelling
  12. Exit codes can lie; read the output
  13. A dry run on real data finds what a design review cannot
  14. The failure that reports itself is the safe one
  15. Ask what your measure cannot represent
  16. An instrument that shares the blind spot cannot find it
  17. Read the source, not your memory of it
  18. A generated list is a snapshot

1. Queued is not delivered

Failure
A message relayed to a session reported 'delivered', and the answers in it sat unread for about five hours.
Cause
The wrote the message into the session's inbox file, which succeeded. The session had already shut itself down, so no process would ever read that file. 'Delivered' described the hop the sender could see.
Fix
Check whether the target is parked before relaying, and wake it if so. Only a reply from the recipient counts as delivery.
Principle
An acknowledgment confirms the step you can observe, not the end you care about.
Also applies to
A sent email is not a received one: after every send, check the mailbox for a bounce before calling it delivered.

2. Silence from a probe is not absence

Failure
A duplicate session was launched for a project whose original session was alive and idle.
Cause
The check for a live process searched this machine only, found nothing, and that silence was read as 'not running'. The real session was visible only through the account's own listing.
Fix
Before launching or waking anything, list that account's peers through the channel that can actually see them.
Principle
A probe that cannot see a thing returns the same answer as a thing that does not exist.
Also applies to
A medical test with low sensitivity: a negative result means little until you know what the test misses.

3. Failure paths hide failures

Failure
Scheduled jobs crashed exactly when an account hit its usage limit, the one case their fallback code was written for.
Cause
A helper's parameter $Log each caller's $log file path, because names are . The code ran only on the limit path, so normal days never exercised it.
Fix
Rename the parameter (keeping the old name as an alias) and force the failure on purpose with a fake model that always refuses.
Principle
Code that runs only when something has gone wrong is the least tested code you own; trigger it deliberately.
Also applies to
Backups that were never restored, and fire exits that were never opened, fail on the one day they matter.

4. A lexer pass is not a syntax check

Failure
A script declared clean by the check failed when it was actually loaded.
Cause
The check only ran the , which chops text into words and accepts things the grammar forbids. A reserved operator used in the wrong place passed the lexer and failed the .
Fix
Validate with the same full parser that will run the file. It found the error at once.
Principle
A cheaper check that covers only part of the real one passes things the real one rejects. Test with the thing that runs.
Also applies to
A page that passes an HTML (the language web pages are written in) validator can still break in a real browser; a type check passes code that fails at runtime.

5. A clock change broke statements about the schedule, not the schedule

Failure
Times written in notes and messages were off by five hours in both directions, and one job was wrongly called overdue.
Cause
The scheduled jobs used the machine clock and kept running correctly. What broke was humans and agents writing times from memory of which zone the machine was in, after it moved from (Coordinated Universal Time) to Eastern time. Several stamps were even computed by arithmetic instead of read.
Fix
Read both clocks in the same command that writes the stamp, so the number cannot be invented.
Principle
Write a fact from a measurement taken at the moment of writing, not from what you remember the setting to be.
Also applies to
Daylight-saving bugs, where software is right and the meeting invite text is wrong; lab notebooks that record instrument readings directly.

6. An approval gate nobody asked for stalls a pipeline

Failure
A worker agent built one private repository and stopped.
Cause
The orchestrator had added a condition, 'keep repositories private until the owner has run them', that the owner never requested and had in fact already waived. The worker obeyed it exactly.
Fix
Withdraw the gate; keep the content checks (no secrets, no unpublished material, licences); let open questions take a stated default instead of blocking.
Principle
Every gate costs throughput. A permission gate should come from the owner's words; a quality check can come from you.
Also applies to
Required sign-offs in organisations that outlive the risk they were added for.

7. Monitors watch the last incident

Failure
The system disk filled to zero overnight and the guard said nothing.
Cause
The was built after a crash caused by memory and processor overload, so it measured exactly those. The next failure was disk.
Fix
Add disk to the level, and report (without escalating) the disk that is full by design.
Principle
A monitor encodes the failure that prompted it. Ask what it cannot see, not only whether it is green.
Also applies to
Security screening tuned to the last attack; tests written only for bugs already found.

8. A full disk makes empty files, not errors

Failure
Two shared files were found empty after the disk filled, one of them the list of who owns which running job.
Cause
A empties the file first and then writes. On a full disk the first step succeeds and the second fails, leaving a 0-byte file that looks normal.
Fix
Rebuild from a copy, never invent rows; parking now copies a session's memory files to a disk with space first; prefer .
Principle
Make a write all-or-nothing, so a failure leaves the old version rather than nothing.
Also applies to
Databases write to a log before changing data for the same reason; editors save to a temporary file and rename.

9. Staying up is not supervision

Failure
A finished session refused to shut down because it owned a deployed website, and would have stayed up forever.
Cause
The rule treated anything 'still running' as needing a watcher. A cannot fail unattended, and an idle session that nothing wakes is not watching anything anyway.
Fix
A tag for things that cannot go wrong unattended; jobs, loops and scheduled tasks are never tagged.
Principle
Supervision needs a signal that reaches the supervisor. Presence without an alarm is only cost.
Also applies to
An on-call engineer whose pager is off; a smoke detector is supervision, a sleeping person in the house is not.

10. Match the field, not the text

Failure
One session's park was blocked by another session's claim row.
Cause
The check looked for the session's name anywhere in a row, so 'launched by X' counted as X owning it.
Fix
Match only the owner slot of the row's fixed format.
Principle
When data has structure, search the structure. Substring matches find mentions, not meanings.
Also applies to
Searching logs for 'error' and matching 'no errors found'.

11. One thing, one spelling

Failure
A scheduled prompt to a parked session went nowhere.
Cause
Sessions park under their folder name, so one was listed as 'Report_Maker' while the scheduler called it 'report-maker'. The exact-name match missed it.
Fix
Normalise names before comparing: ignore case, hyphens and underscores, and wake by the name the parked list uses.
Principle
Any identifier compared across systems needs one canonical form, applied on both sides.
Also applies to
Email addresses that differ only in case, and duplicate customer records that differ by a space.

12. Exit codes can lie; read the output

Failure
Scheduled briefs failed every morning for four days while looking successful.
Cause
A run refused by a prints a short message and still returns 0.
Fix
Detect the limit from the output text, then step down the .
Principle
Judge success by the artifact you wanted, not by the status the tool reports.
Also applies to
Web servers that return '200 OK' with an error page in the body.

13. A dry run on real data finds what a design review cannot

Failure
The thread keeper's first design would have treated self-sent mail as read and nudged on it.
Cause
A mail service never marks your own mail unread, so the absence of the meant 'read' only for mail from a different sender. Only 2 of 29 self-sent threads carried the label.
Fix
A against the real mailbox before any send; three design faults were found and fixed in one pass.
Principle
A signal's meaning depends on conditions you did not write down. Real inputs reveal them; imagined ones do not.
Also applies to
Read receipts that some clients never send, read by the sender as 'ignored'.

14. The failure that reports itself is the safe one

Failure
A swarm read 32% of its sources only as abstracts, while 70% of those had a legal free copy.
Cause
The agent followed each paper's identifier to the publisher's paywall and stopped. A blocked read is visible; a free copy never looked for is invisible, so the result looked complete.
Fix
Look up an copy before tagging a source abstract-only, and record read method as a required field.
Principle
Design for the failures that make no noise; the loud ones take care of themselves.
Also applies to
Survivorship bias: the planes that did not come back are the ones whose damage you never see.

15. Ask what your measure cannot represent

Failure
A database query reported no inhibitor-bound structure of an enzyme, and the project nearly skipped four that existed.
Cause
A ligand query cannot see a peptide inhibitor, which is stored as a polymer chain, nor fragments below a size cutoff. Two text searches had agreed, but they were the same kind of measure.
Fix
Pick the second measure to cover what the first cannot represent, and state the claim at the strength the evidence supports.
Principle
A zero from one metric is not an absence. Write the number and the measure together.
Also applies to
'No side effects reported' from a trial too small to detect a rare one.

16. An instrument that shares the blind spot cannot find it

Failure
A model playing a naive student declared pages understandable too early.
Cause
A language model cannot un-know a word. Its simulated confusion is lowest for exactly the terms it finds most familiar.
Fix
Pair it with , a plain program that counts unexplained terms, and use a different model as reader than as writer.
Principle
A must not share the generator's blind spots, or agreement proves nothing.
Also applies to
Authors proofreading their own text read what they meant, not what they wrote.

17. Read the source, not your memory of it

Failure
The orchestrator labelled two features as optional extras that the owner had asked for by name.
Cause
It worked from its recollection of the request. A worker session re-read the owner's verbatim words and showed both were literal asks.
Fix
Keep the owner's words verbatim in a file in each project and decide from that file.
Principle
A session reading the primary record beats a session remembering it, however senior.
Also applies to
Citing a paper through someone's summary of it, and inheriting their mistake as consensus.

18. A generated list is a snapshot

Failure
A request sent to 21 sessions found 7 of them no longer existed.
Cause
The is rebuilt by a script from what it can see at that moment; sessions had ended since.
Fix
Treat each entry as a claim to verify at the moment of use, and record the misses.
Principle
Any cached view of a changing system goes stale; the cost of trusting it rises with its age.
Also applies to
A phone's contact list after people change numbers; DNS (Domain Name System, the internet's name-to-address directory) records cached past a server move.