---
name: read-a-controls-output-not-just-its-exit-code
description: An exit code is one bit of a control's testimony — a control can exit exactly as you hoped while its output says the run was void, the figure wrong, or the repo undetected.
metadata:
  type: feedback
---

**The exit code you were hoping for is the weakest possible confirmation.** A control that exits 0
(or the 101 you predicted) can still be telling you, in its output, that it measured the wrong
thing, derived a wrong figure, or never ran at all.

Instances, all spt-core:
- 2026-09-08: a negative-control probe exited **101 exactly as designed** — the outcome I wanted —
  while its printed firewall range was hand-derived and WRONG, and disagreed with both the rig's
  actual bind and the board's ask. Three instructions for one action, two of them mine; caught only
  by reading the output. See [[two-instructions-for-one-action-must-be-reconciled-at-authoring]].
- 2026-09-09: `gh run view --log-failed` exited 1 and the *reason* was in the output —
  `failed to determine base repo: not a git repository` — because I had run it from a scratchpad,
  not the repo. The exit code alone would have read as "no failed logs available."
- Same day: `grep -c $'\r'` returned **0** on a file `od` proved was CRLF. The command succeeded;
  the probe was broken. Terminators re-measured with `tr -cd '\r' | wc -c` before appending.

**Why it matters:** an exit code is a summary authored by the tool for its own purposes, and it
collapses "worked" with "declined to work" and "worked on the wrong input." When a control's whole
job is to underwrite a later claim, accepting its exit code is accepting a one-bit summary of the
evidence you are about to stake a verdict on.

**How to apply:** capture stdout AND stderr of every control to a file and READ it — the exit code
selects which sentence to read, it does not replace it. Be most suspicious when the code is the one
you predicted; that is when the urge to skip the output is strongest. Verify the instrument against
a case with a KNOWN answer before trusting it on the unknown one. Siblings:
[[render-not-read-pipefail]] (a pipe hands you the tail's exit), [[exit-code-after-a-pipe-is-the-tails]],
[[a-control-must-sever-the-branch-from-its-consequence]].
