[HARDENING] PENDING-172 AMENDMENT 1: the condition is detectable from outside the session

The parent claimed only option (d) — not running background workers — could be
enforced without depending on the party being checked. That was wrong, and the
correction is better than the claim: ~/.claude/jobs/<id>/state.json records a
respawnFlags field, so whether a parked worker would take a turn with no human
present is checkable on disk, before the restart, without asking the session
anything. acaabadf carried --reply-on-resume; the May orphan carried [].

Also records that `claude stop` and `claude rm` report "the background service
may be restarting" when the daemon has in fact exited (idle_exit, live_workers=0)
— a plausible message standing in for a diagnosis, the same shape as `Bye!` in
the parent.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wn9mxsFjHJkzYjuDdrtxwp
This commit is contained in:
David F Glidden
2026-08-31 09:40:40 +02:00
co-authored by Claude Opus 5
parent 85ce5b8343
commit aa7b7f0890
+32
View File
@@ -6598,3 +6598,35 @@ At 07:02:51Z the `SessionStart` hook injected the wake digest into that session
**Files affected:** `~/.claude/settings.json` (`SessionStart` hook); `dotfiles/scripts/wake-digest.py`; `~/.claude/skills/wake-up/SKILL.md`; `~/.claude/skills/symmetria/SKILL.md` and `wrap-up` (the date-keyed single-writer paths). `~/CLAUDE.md` Constraint 5 is **not** proposed for amendment — it was not wrong; it was unenforced.
**Awaiting:** Steward authorization.
---
## PENDING-172 — AMENDMENT 1: the condition is detectable from outside the session, and `stop` reports a guess
**Date:** 2026-08-31
**Amends:** PENDING-172 (2026-08-31), same day, after the steward stopped the resumed worker and asked for the May orphan to be cleared. The parent's analysis stands; this supplies the detection surface the parent said it lacked and corrects one claim in its Recommendation.
**⚠ THE PARENT'S RECOMMENDATION UNDERSTATED THE OPTIONS, AND THIS CORRECTS IT.** The parent argued that (b) and (c) are *"text and logic inside the session"* and that only (d) — not running background workers — is enforceable without depending on the party being checked. That is now **wrong**, and the correction is better than the claim: `~/.claude/jobs/<id>/state.json` carries a **`respawnFlags`** field recording exactly what a parked worker will be respawned with. Read across both job dirs before the orphan was cleared:
```
acaabadf respawnFlags=["--reply-on-resume", "--allowed-tools", "mcp__computer-use__…"] state=stopped
84ce2880 respawnFlags=[] state=blocked
```
⇒ **whether a parked worker would take a turn with no human present is recorded per session, on disk, and checkable without asking the session anything.** The May orphan would not have; `acaabadf` did, and did. This is a **differently-positioned checker in Constraint 6's own sense** — it reads the harness's state, not the executor's account of itself — and it is the first mechanism in this file that can answer "is the loop currently removable?" before the removal rather than after.
**⇒ Option (e), which the steward should weigh against (d):** a check over `~/.claude/jobs/*/state.json` reporting any parked worker whose `respawnFlags` contains `--reply-on-resume`. Cheap, external, falsifiable, and it fails loudly (a missing job dir reads as absence, not as safety — ⚠ which is its known weakness and must be stated wherever it is built).
**⚠ A second, smaller defect, recorded because it cost a wrong diagnosis.** `claude stop 84ce2880` and `claude rm 84ce2880` both returned *"couldn't confirm … — the background service may be restarting. Try again in a moment."* The service was **not** restarting. `~/.claude/daemon.log`:
```
07:35:50Z [bg] bg settled acaabadf (killed)
07:35:55Z [supervisor] idle 5s with no clients — exiting
07:35:55Z [supervisor] shutting down (cause=idle_exit, uptime=2028s, leases=0, live_workers=0)
```
The steward's `stop` succeeded and the transient daemon then exited for want of clients, so there was no service to receive the next command. **The message names a cause the tool did not check** — the same shape as `Bye!` in the parent item: a plausible report standing in for a diagnosis. Retrying "in a moment" would never have worked.
**Disposition taken, and it was the steward's instruction.** The May orphan (`84ce2880`, *"Start with vignette"*, cliVersion 2.1.145, no transcript on disk — aged out of the 30-day window) was removed by deleting `~/.claude/jobs/84ce2880/` directly, after both its files were read and their load-bearing values quoted above. `pins.json` was `[]`; no worktree; `live_workers=0` already. `~/.claude/jobs/acaabadf/` was **deliberately kept** — it is the evidence for the parent item.
**Files affected:** unchanged from the parent, plus `~/.claude/jobs/*/state.json` as the read surface for option (e).
**Awaiting:** Steward authorization (with the parent).