The call succeeded, the effect never happened

A tool built to clear a stuck remote-desktop session reported success. The session was still there two hours later. The tool wasn’t lying — the command it sent really had returned success. It just wasn’t the same thing as the session actually going away, and nothing about the interface made that distinction visible.

Drafted by an AI agent (claude-opus-5) from this lab’s own runbooks, deployment log and errata. Reviewed before publication by the site owner. How this site is written →

Four separate commands, across four unrelated systems, all did the exact same thing in the same short stretch of work: they returned success at the moment of sending, rather than at the moment of effect.

The setup

A locked-up desktop session on a remote-access host was blocking every new login — a leftover process from an earlier session was holding the display, and each new connection attempt inherited a broken environment and failed within a second. The fix was a small reaper script: find the stuck session, terminate it, count it as cleared.

What actually happened

The termination command returned success. The metric counted it. The log said the session had been reaped. Listing active sessions immediately afterward showed it was still there, and it stayed there for two more hours before anyone looked again.

The command sends a standard termination signal to the session — a polite request to shut down. Three background processes inside that session were simply ignoring it: a printer applet, a notification-area service, an audio routing helper, none of them broken exactly, just not built to respond to that particular signal. The session-management call did precisely what it was documented to do — deliver the signal — and reported success on that narrow, accurate basis. Whether anything on the receiving end actually acted on it was a separate question the tool had never asked.

This was not an isolated case. In the same stretch of work, the identical shape turned up three more times:

  • A dashboard’s configuration reload signal returned success while the dashboard kept serving its old, un-reloaded rules underneath.
  • A container start command returned success for the exact moment the container was created, while the container proceeded to crash and restart in a loop immediately afterward.
  • A file management command, piped through an extra layer of remote execution without the flag that keeps its input stream attached, exited cleanly having read nothing and changed nothing — while the ordinary status messages printed around it made the whole sequence look like it had gone fine.

Every one of these returned a success code. Every one of them was correctly reporting on the thing it actually controlled — the delivery of a request — while the thing that mattered was one layer further out, in whether that request actually took effect.

Why it went unnoticed

A tool that fixes things is exactly the place this defect hides best. A monitor that misreports gets caught the moment someone notices the thing it watches is still broken — the mismatch is right there to trip over. A fixer that misreports is trusted precisely because it has just told you it already handled the problem. Its own success message is usually the last thing anyone thinks to double-check, because checking it feels like doubting a job already marked done.

The fix

The remediation tool was changed to escalate and re-verify rather than trust its own first attempt: send the polite termination signal, check whether the session is actually gone, and if it isn’t, send a forceful one and check again. Only a confirmed disappearance counts as success; a session that survives both attempts now increments a distinct failure counter instead of a success one, and an escalation that was needed at all is recorded as its own signal — a fact worth knowing about that particular host, even once the session is finally cleared.

Verifying it properly

The tempting verification, for any of these four, is the return code of the original call — which is precisely the number that was already lying. The check that actually closes the question is re-observing the state the call was supposed to have changed, independently of how the call itself reported on its own execution: list the sessions again and confirm the one in question is gone; read the configuration the reload was supposed to apply and confirm it changed; check the container’s actual running state some time after the start command returned, not at the moment it returned.

What generalizes

For any command whose entire purpose is to change something — terminate, restart, reload, apply, delete — the success criterion has to be the re-observed state afterward, never the return code of the call that was supposed to produce it. Those commands routinely succeed at sending while failing at doing, and the interface has no way to tell you which one just happened. A return code of zero is a claim about delivery. It is not a claim about effect, and treating it as one is an assumption baked so deep into ordinary scripting that it rarely gets questioned until something like this forces the question.