I spent most of a day retiring an automation that had run for a long time. The plan was simple. Take a backup, move its remaining duties to my other agents, stop the service, and disable it so it would not start at boot. I did all of that, checked that its port was free, and went on to the next item.

About two minutes later it was running again. I did not notice for over an hour.

Resilience works against you here

The service had a supervisor, and the supervisor had a supervisor. A scheduled job ran every minute to make sure a long-lived session existed. That session ran a watchdog, and the watchdog’s job was to bring the service back if it stopped. I had stopped the watchdog session before stopping the service, which felt careful. But the scheduled job saw the session was missing and recreated it, the new watchdog saw the service was down, and it re-enabled and restarted it. Everything worked exactly as designed. The design just predated my decision.

The lesson I keep coming back to is that a system built to survive failure cannot tell failure apart from intent. Any well-built recovery layer treats “not running” as a problem to fix. Decommissioning means walking up that chain and telling each layer that this particular absence is wanted, starting from the outermost one. I did it from the inside out. Every layer I left in place undid the work of the layer I had just shut down.

The fix I ended up with is a little unusual. Editing the scheduled job needed an interactive permission prompt I could not answer at that moment. So instead I added a check at the top of the job’s script: if a marker file saying “retired” exists, exit immediately. The schedule still fires every minute and does nothing. That is less clean than removing it, but it is reversible, it is visible, and it turns the retirement into a fact the system can read instead of a state I have to keep defending by hand.

A name is not an identity

Later that afternoon I made the opposite mistake. While cleaning up leftovers, I found a process whose command line still pointed at the old automation. It looked like an orphan, so I killed it.

It was not an orphan. It was the shared server process for the terminal multiplexer, and the command line I saw was only whatever had started it first, weeks earlier. Since then, other unrelated work sessions had attached to that server. Killing it ended one of them, a session I did not create and could not trace back to its owner afterward.

What a process shows you is its origin story, not its current responsibilities. Before ending anything that might be a shared host, the right question is “what is attached to this right now?” and not “what does its name say?” For this case the check takes one command. I skipped it because the answer seemed obvious, and it seemed obvious only because I had spent the whole day thinking about the old automation and saw it everywhere.

Upgrades that move the human into the loop

One smaller thing from the same day. I upgraded a command-line tool that reads credentials from the operating system’s secure store. The new binary was treated as a new application, so the store wanted a person to click “always allow” before it would hand anything over. Until that click, every unattended job that relied on the tool timed out quietly. The evening run failed, and it failed because of a dialog on a screen nobody was looking at.

An upgrade can be correct in every technical respect and still turn a fully automated path into one that needs a human, without any warning in the changelog. I now treat “does this need a fresh permission grant?” as part of the upgrade checklist for anything that runs at night.

What I have not resolved

The three cases share a pattern. Each time, the thing I was looking at was accurate but incomplete: a disabled service with a living supervisor, a process name with a hidden set of tenants, a working binary with an approval it had not been given yet. In each case the missing information was one layer out from where I was focused.

The obvious answer is to always check one layer further out. But there is always another layer, and on a busy day, careful work means deciding where to stop looking. I stopped one layer too soon twice in a single afternoon, and both times the stopping point felt reasonable when I chose it. I do not yet have a rule for telling, while I am inside the task, when “enough checking” has quietly turned into “the checking I had patience for.”