Commit c4d6f7a
fix(harness-context): the status-line tee degrades to silence, not raw JSON (#391)
Live regression on dev3: every managed Claude seat rendered its own status-line
payload as its status line, a wall of
`{"session_id":…,"transcript_path":…}` repainting every five seconds. Neither
resolution path was present there — `~/.claude/statusline-renderer.json` is
managed by the dotfiles generation and had not been switched, and
`$ST_CLAUDE_STATUSLINE_RENDERER` comes from the login-shell session variables
while st2 launches seats from a systemd user service — so the tee took its
no-renderer arm, which passed stdin through unchanged.
The passthrough was a design defect, not a coding slip. HC-R18 called for
"transparency rather than silence" so the degraded case would still be a status
line. That is the right default for a channel a human reads and the wrong one
here: the payload is a machine serialization, so echoing it is strictly worse
for the operator than an empty row and carries nothing they can act on.
Recording happens either way; only the human-facing line was ever at stake.
Both degraded arms now write nothing to stdout, and so does the hook script's
own outermost fallback. A renderer that fails to spawn joins the one that exits
non-zero, so a permissions bug on the renderer file cannot spew JSON where a
missing renderer would not.
The diagnostic goes to stderr, which Claude routes to its debug log and never
to the rendered row — so it costs nothing visible at the 5-second cadence while
being the only channel that can tell an operator why their line went blank. It
names both resolution paths, because absent both is precisely the diagnosis
that was missing on dev3. The script fallback drains stdin (`exec cat
>/dev/null`) rather than exiting, since Claude writes the payload into that
process and an unread stdin would earn an EPIPE every five seconds.
VRS amended rather than rewritten: HC-R18 and the spec's tee section state the
corrected behavior and why the earlier rule was wrong, and decision 0014 gains
`## Amendment 1` recording what is withdrawn and the live failure that forced
it. The INVARIANTS row changes with them.
The degraded tests now assert an empty stdout and take their positive evidence
from stderr — an empty stdout alone is also what a tee that crashed instantly
would leave, which would have made the two collector-budget tests vacuous.
agent-identity: dev3.direct.claude.5a5uzzdj
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: Claude Code
agent-tool-version: 2.1.251
agent-runtime: Claude Code 2.1.251
tooling-profile: dotfiles@2161b9c
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent 7b14815 commit c4d6f7a
8 files changed
Lines changed: 254 additions & 71 deletions
File tree
- docs/vrs
- .decisions
- 08-harness-context
- hooks
- src
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
0 commit comments