Link copied
Blog › The Wrong Note That Kept an Outage Alive for Eight Nights
AI Workflow

The Wrong Note That Kept an Outage Alive for Eight Nights

KG
Teh Kim GuanACMA · CGMA
2026-09-18 · 6 min read
The Wrong Note That Kept an Outage Alive for Eight Nights

An automated job has succeeded when the state it exists to move has moved. An exit code of zero is the job's opinion of itself.

The incident in one paragraph

A nightly job syncs my WhatsApp history into a local archive that several other tools read: a feedback compiler for a product team, a weekly intelligence digest, and ad hoc searches when I need to recall what a client said. On 9 September, WhatsApp began rejecting the sync tool with Client outdated (405). The job failed that night and the next seven. On the morning of the ninth day it was fixed in minutes. The fix was a download from the tool's public release page, a checksum, and a file copy. Nine days of messages were recovered because the linked device's replay window happened to reach that far back.

The failure is ordinary. Tools age out. What deserves attention is why a five-minute fix took eight nights.

What actually held the outage open

The job had been reporting its failure every night. The diagnosis was on record, and it was right about the cause: the client build was too old. It was wrong about the fix. Both the job's own log lines and a reference note in my knowledge base stated that there was no Go toolchain and no source tree on this machine, so the job could not repair itself and would need someone at a machine that could compile the tool.

That sentence was false. The upstream project publishes a prebuilt Windows binary with every release. Nobody had checked, because the note already answered the question.

A knowledge base exists to save you from re-deriving things, which is why a wrong entry in it lasts. A missing note costs you one investigation. A confident wrong note costs you every investigation that would have happened, because each reader stops at the answer.

The eight nights were not lost to the 405. They were lost to one sentence.

The second failure hiding under the first

Clearing the backlog exposed a subtler problem. The sync command has a mode that catches up and then exits when idle. It exits with code 0. Each pass advanced the archive by a day or two, went idle, and returned success, while still days behind. A script trusting that exit code would have declared the backlog cleared after the first pass. It took four passes, and the only reliable signal was the archive's own last-sync timestamp moving forward.

Then the same blind spot turned up two layers deeper. A guard script, written to check that the archive was fresh before the feedback compiler read it, judged success by return code. After a 405, the archive is idle and clean, so the guard returned 0. It never recorded the last-sync time before running, so a frozen clock was invisible to it. This was worse than the original job. The guard gates a read, so a 405 would have let the compiler produce a confident weekly report on data that had not changed in a week.

One layer further out, a weekly routine that calls that guard handled only two of its exit codes. After the guard was changed to return a distinct code for "client outdated", that code fell outside the routine's instructions. The fix in the guard would have been silently swallowed by its caller.

The same shape appears in the twelve routines that went dark while the dashboard stayed green: the monitoring read the job's account of itself, not the world the job was supposed to change. It is also the verifier problem I described in what running fifty-odd agents taught me.

The practice: success is a state change

Before, the job reports success from exit code 0. After, the job checks whether the last-sync time moved forward and returns a distinct code if not

The rebuilt job now owns four judgements that prose instructions kept getting wrong.

ConcernOld judgementNew judgement
Did the sync work?Exit code 0Last-sync timestamp advanced
Is the backlog cleared?One pass returned 0Timestamp within a day of now, verified by date coverage
Is the client outdated?Parsed only after a failureScanned for the 405 before the exit code is read
Is another sync running?Lock file present means kill itLock present and counters advancing means leave it alone

A lock file with an active writer behind it looks identical to a stale lock. Killing it destroys a live database write. So the job now reads whether the counters are moving before it touches anything, and a locked store that is still advancing is classified as working, with no alert raised.

Each exit path gets its own code (0 caught up, 10 client outdated, 11 stalled, 12 skipped), and the guard reuses the same numbering so nothing that read the old codes changes meaning. Every caller now stops on any non-zero code and names all of them.

One thing deliberately not automated

The obvious next step would be to have the job download and install a new release itself when it detects a 405. It does not. It detects the condition, checks upstream read-only, and escalates with the exact commands to paste.

A routine that fetches and executes a new binary unattended at 22:00 is a supply-chain decision. The convenience is real, and so is the risk: the job would be trusting whatever a public release page served that night, on a machine that holds client correspondence. That decision belongs to a person. The job's specification now says so in plain words, so a future edit does not quietly add it back in the name of helpfulness.

What to take from this if you run any automation

Three rules, each earned by a specific night of lost data.

  1. Date every "cannot" in your notes, and treat it as a hypothesis. "No toolchain on this machine" is a claim about the world at a moment. It should carry the date it was checked and the command that checked it. The next reader then knows to spend two minutes re-running that command rather than accept the conclusion.
  2. Define success as the state you care about, measured directly. If a job exists to make data fresh, success is fresh data, read from the data. Exit codes, log lines and "completed" messages are the job describing itself. They are useful for diagnosis and worthless as proof.
  3. When you fix a signal, walk every caller of that signal. Changing what a component returns is a change to every component that reads it. The fix here was correct at the guard and would have failed at the routine above it. A search scoped to one folder found no callers; a workspace search found the one that mattered.

The accountant's version

Finance teams will recognise the pattern. A bank feed that "ran successfully" but imported no transactions is the same failure. So is a month-end checklist item ticked because the report was generated, when nobody looked at whether the closing balance moved. The control that works reads the ledger, not the job log.

Documentation fails the same way. A process note that says "this cannot be done in-house" deserves the suspicion you give an unreconciled balance, because it silently shapes every decision made downstream of it. Nobody audits the "cannot" lines, and that is where the cost hides.

What it cost, and what it would have cost

  • Cost: eight failed nights, nine days of messages at risk, and a handful of individual messages that will never decrypt because their session keys rotated during the gap.
  • Averted: a weekly product feedback report built on a week-stale archive, delivered with full confidence, because the freshness guard could not see a frozen clock.
  • Still open: nothing yet watches upstream releases of this tool. A monthly check of the release page would have caught the 405 on the first day. That is the next instrument, and it is a small one.

Part of the Operating Principles series from KG Consultancy.

About the Author
KG
Teh Kim Guan
Product Consultant · General Manager, PEPS Ventures

Strategy and technology are the same decision. Over 15 years in fintech (CTOS, D&B), prop-tech (PropertyGuru DataSense), and digital startups, I have built frameworks that help founders and executives make both moves at once. Based in Kuala Lumpur.

More from the blog
AI Workflow
Green on the Wrong Artifact
Four times in one week a check passed while the thing users would load was broken. The checks were honest. They were aimed one step short of the user.
2026-09-25 · 5 min read
Frameworks
A Rule That Lives Only in Prose Does Not Fire
Four rules I believed were enforced were all written prose, and all four failed in one week. The four executable checks caught every error they were pointed at.
2026-09-11 · 6 min read
Frameworks
A Script Is Not an Owner
A decision assigned a weekly render to a script. The script worked, and four Fridays passed without it running, because nothing was scheduled to call it.
2026-08-28 · 6 min read
Work with KG

Working on a 0→1 product?

I help founders and operators go from idea to validated product. Let's talk about yours.

Get in touch →