Skip to content

fix: avoid unnecessary main turns during watcher recovery - #51

Open
peterOC26 wants to merge 5 commits into
mainfrom
fm/fm-claude-spend-cuts-pick-c2
Open

peterOC26 wants to merge 5 commits into
mainfrom
fm/fm-claude-spend-cuts-pick-c2

Conversation

@peterOC26

@peterOC26 peterOC26 commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Intent

Captain wants to save Claude Code tokens, which is why he asked to update firstmate (2026-11-08 ~22:55Z chat: "we want to save claude code tokens ... answer all questions with your recommendation 80% plus"). The study data/fm-claude-spend-checks-c1/report.md (with data/fm-claude-spend-checks-c1/astra-opinion.md beside it) ranked six cuts to guard-wake spend; the decision, now that upstream sync #45 has merged, is to build rows 1 and 2 locally and row 3 as a firstmate repo fix; rows 4-6 stay out (row 4 is covered by fm-startup-record-held-compact-b1).

The referenced selected cuts are:

  1. De-rate the optional shadow publication probe to at most once per 24h and a controlled delivery sample; keep the silent detector and its trial review. Retain silent collection and scheduled bulk verdict review; do not mark the acceptance test passed from delivery count alone.
  2. Deduplicate wait/resource notices by the underlying episode; keep cheap polling, notify on changed actionable facts, preserving new failures, lease changes and newly usable capacity.
  3. Preserve recovery but stop empty/settled rearm-resurface episodes from requiring main reasoning; offer original eligible task rows to the host. Use a deterministic no-model path only for a proven empty/settled recovery episode; do not retire resurface or clear its marker early. Preserve original sequence IDs, main-owned rows, per-actor grants, failure handback, recovery generation and post-handling acknowledgement. Generic attended check permission is insufficiently scoped.

What Changed

  • Let the supervision host handle attended rearm-resurface wakes using original eligible task rows, while preserving main-owned rows and scoped acknowledgement.
  • Settle empty recovery without a model turn only when generation, queue, status presentation, decision, and outcome checks prove it safe.
  • Preserve interrupted handling generations until acknowledgement, and update recovery documentation and regression coverage.

Risk Assessment

⚠️ Medium: No defects were found. The risk is still medium because the change adds a new durable interrupted kind to the recovery-marker state machine and a no-model retirement path, and every token consumer has to stay consistent with them. I traced those consumers (publish, append, handback, reopen, arm-check, begin-handling, ack, drain, autoarm, afk-return, watch-arm successor). The F1 and simplify-1 fixes are correctly gated: settlement only accepts announced:downtime with an empty queue under both locks, handling history survives as interrupted, and the recovery offer applies only to the host.

Testing

Targeted drain tests, three host-loop tests with a stub engine, and nine live CLI cases passed. Captured command outputs and recovery-state snapshots; corrected driver setup issues and removed all disposable labs. The real Claude attempt stopped at workspace trust, retaining the previously declined coverage limitation. No rendered UI changed; evidence is CLI transcripts. The separately documented pre-existing Pi test failure was not rerun or modified.

  • Live validation: ✅ go - 9 of 10 scenarios driven live against the product
Scenario Result Live Evidence
Rearm proven-empty recovery: retire its generation without a wake and keep the watcher running ✅ pass live Live CLI outputs and persisted recovery state: settled-empty-no-wake
Rearm without presentation evidence: retain recovery and wake main ✅ pass live Live CLI outputs and persisted recovery state: uncertain-recovery--no-cursor
Rearm with unread failure status: retain recovery and wake main ✅ pass live Live CLI outputs and persisted recovery state: uncertain-recovery--unread-status
Rearm with an open blocker buried beneath newer prose: preserve the decision and wake main ✅ pass live Live CLI outputs and persisted recovery state: uncertain-recovery--open-decision
Rearm after an outcome was read but not processed: refuse empty settlement ✅ pass live Live CLI outputs and persisted recovery state: uncertain-recovery--unprocessed-outcome
Rearm with corrupt outcome evidence: preserve recovery and wake main ✅ pass live Live CLI outputs and persisted recovery state: uncertain-recovery--corrupt-outcome
Interrupt handling after status presentation: preserve the same generation across watcher close until explicit acknowledgement ✅ pass live Live CLI outputs and persisted recovery state: interrupted-handling-needs-ack
Rearm a remote mate: exclude its parent channel while preserving recovery for new local failures ✅ pass live Live CLI outputs and persisted recovery state: remote-parent-channel-exclusion
Offer recovery rows through host dispatch: preserve sequence IDs and main-owned rows, reject unrelated checks, and retain Pi's existing boundary ✅ pass live Live CLI outputs and persisted recovery state: host-only-scope-and-actor-grants
Have the real attended Claude engine handle eligible recovery rows and return failures to main ⏸️ untested no The installed Claude CLI stopped at this worktree's workspace-trust dialog. The harness-adapters skill (.agents/skills/harness-adapters/SKILL.md), through its Claude reference, instructs: “Never try t…
Evidence: Live CLI outputs and persisted recovery state

Source: Live CLI outputs and persisted recovery state

[
  {
    "scenario": "settled-empty-no-wake",
    "command": [
      "bin/fm-lab-home.sh",
      "create",
      "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA/.lo4adnbwn"
    ],
    "exit": 0,
    "output": "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA/.lo4adnbwn\n"
  },
  {
    "scenario": "settled-empty-no-wake",
    "command": [
      "tmux",
      "-L",
      "fm-lab",
      "new-session",
      "-d",
      "-s",
      "watcher-lab",
      "-x",
      "120",
      "-y",
      "36",
      "-c",
      "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA",
      "bash"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "settled-empty-no-wake",
    "command": [
      "tmux",
      "-L",
      "fm-lab",
      "display-message",
      "-p",
      "#{socket_path},#{pid},0"
    ],
    "exit": 0,
    "output": "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA/.lo4adnbwn/tmux/tmux-1000/fm-lab,1968142,0\n"
  },
  {
    "scenario": "settled-empty-no-wake",
    "command": [
      "bin/fm-wake-drain.sh"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "settled-empty-no-wake",
    "command": [
      "bash",
      "-c",
      ". bin/fm-wake-lib.sh; fm_recovery_marker_publish \"$STATE/.watcher-down\" downtime"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "settled-empty-no-wake",
    "state": "empty recovery retired while watcher remains live",
    "files": {
      ".watcher-down": "acked:downtime:1969473.1794232371.Ra5QHj\n",
      ".wake-queue": "",
      ".status-presentation-cursor": ""
    }
  },
  {
    "scenario": "settled-empty-no-wake",
    "result": "pass"
  },
  {
    "scenario": "settled-empty-no-wake",
    "command": [
      "bin/fm-watch-arm.sh",
      "--stop"
    ],
    "exit": 0,
    "output": "watcher: stopped pid=1969569\n"
  },
  {
    "scenario": "settled-empty-no-wake",
    "command": [
      "tmux",
      "-L",
      "fm-lab",
      "kill-server"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "uncertain-recovery--no-cursor",
    "command": [
      "bin/fm-lab-home.sh",
      "create",
      "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA/.l2nodiqp_"
    ],
    "exit": 0,
    "output": "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA/.l2nodiqp_\n"
  },
  {
    "scenario": "uncertain-recovery--no-cursor",
    "command": [
      "tmux",
      "-L",
      "fm-lab",
      "new-session",
      "-d",
      "-s",
      "watcher-lab",
      "-x",
      "120",
      "-y",
      "36",
      "-c",
      "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA",
      "bash"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "uncertain-recovery--no-cursor",
    "command": [
      "tmux",
      "-L",
      "fm-lab",
      "display-message",
      "-p",
      "#{socket_path},#{pid},0"
    ],
    "exit": 0,
    "output": "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA/.l2nodiqp_/tmux/tmux-1000/fm-lab,1972087,0\n"
  },
  {
    "scenario": "uncertain-recovery--no-cursor",
    "command": [
      "bash",
      "-c",
      ". bin/fm-wake-lib.sh; fm_recovery_marker_publish \"$STATE/.watcher-down\" downtime"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "uncertain-recovery--no-cursor",
    "state": "no-cursor retained recovery and emitted main wake",
    "files": {
      ".watcher-down": "announced:downtime:1972102.1794232375.jpyktd\n",
      ".wake-queue": ""
    }
  },
  {
    "scenario": "uncertain-recovery--no-cursor",
    "result": "pass"
  },
  {
    "scenario": "uncertain-recovery--no-cursor",
    "command": [
      "tmux",
      "-L",
      "fm-lab",
      "kill-server"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "uncertain-recovery--unread-status",
    "command": [
      "bin/fm-lab-home.sh",
      "create",
      "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA/.l5mqj4_4r"
    ],
    "exit": 0,
    "output": "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA/.l5mqj4_4r\n"
  },
  {
    "scenario": "uncertain-recovery--unread-status",
    "command": [
      "tmux",
      "-L",
      "fm-lab",
      "new-session",
      "-d",
      "-s",
      "watcher-lab",
      "-x",
      "120",
      "-y",
      "36",
      "-c",
      "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA",
      "bash"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "uncertain-recovery--unread-status",
    "command": [
      "tmux",
      "-L",
      "fm-lab",
      "display-message",
      "-p",
      "#{socket_path},#{pid},0"
    ],
    "exit": 0,
    "output": "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA/.l5mqj4_4r/tmux/tmux-1000/fm-lab,1973397,0\n"
  },
  {
    "scenario": "uncertain-recovery--unread-status",
    "command": [
      "bash",
      "-c",
      ". bin/fm-wake-lib.sh; fm_recovery_marker_publish \"$STATE/.watcher-down\" downtime"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "uncertain-recovery--unread-status",
    "state": "unread-status retained recovery and emitted main wake",
    "files": {
      ".watcher-down": "announced:downtime:1973406.1794232376.xzh7jS\n",
      ".wake-queue": "",
      ".status-presentation-cursor": ""
    }
  },
  {
    "scenario": "uncertain-recovery--unread-status",
    "result": "pass"
  },
  {
    "scenario": "uncertain-recovery--unread-status",
    "command": [
      "tmux",
      "-L",
      "fm-lab",
      "kill-server"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "uncertain-recovery--open-decision",
    "command": [
      "bin/fm-lab-home.sh",
      "create",
      "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA/.ljtr5ak14"
    ],
    "exit": 0,
    "output": "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA/.ljtr5ak14\n"
  },
  {
    "scenario": "uncertain-recovery--open-decision",
    "command": [
      "tmux",
      "-L",
      "fm-lab",
      "new-session",
      "-d",
      "-s",
      "watcher-lab",
      "-x",
      "120",
      "-y",
      "36",
      "-c",
      "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA",
      "bash"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "uncertain-recovery--open-decision",
    "command": [
      "tmux",
      "-L",
      "fm-lab",
      "display-message",
      "-p",
      "#{socket_path},#{pid},0"
    ],
    "exit": 0,
    "output": "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA/.ljtr5ak14/tmux/tmux-1000/fm-lab,1974530,0\n"
  },
  {
    "scenario": "uncertain-recovery--open-decision",
    "command": [
      "bin/fm-wake-drain.sh"
    ],
    "exit": 0,
    "output": "OPEN DECISIONS (still open, folded from the durable status logs - not just the latest line):\ndemo [key=capacity] blocked: no capacity\nOPEN DECISIONS: close one by answering it: bin/fm-send.sh <task> --resolve-key <key> '<answer>'\nOPEN DECISIONS: <key> is the [key=...] printed before the verb; a token inside a note is prose, not a key.\n"
  },
  {
    "scenario": "uncertain-recovery--open-decision",
    "command": [
      "bash",
      "-c",
      ". bin/fm-wake-lib.sh; fm_recovery_marker_publish \"$STATE/.watcher-down\" downtime"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "uncertain-recovery--open-decision",
    "state": "open-decision retained recovery and emitted main wake",
    "files": {
      ".watcher-down": "announced:downtime:1975514.1794232379.6Deuho\n",
      ".wake-queue": "",
      ".status-presentation-cursor": "demo\tstrong:65028:18647277:2026-11-09 14:52:57.110940527 +0100\t0\t0\n"
    }
  },
  {
    "scenario": "uncertain-recovery--open-decision",
    "result": "pass"
  },
  {
    "scenario": "uncertain-recovery--open-decision",
    "command": [
      "tmux",
      "-L",
      "fm-lab",
      "kill-server"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "uncertain-recovery--

... [9717 bytes truncated] ...

  "fm-lab",
      "new-session",
      "-d",
      "-s",
      "watcher-lab",
      "-x",
      "120",
      "-y",
      "36",
      "-c",
      "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA",
      "bash"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "remote-parent-channel-exclusion",
    "command": [
      "tmux",
      "-L",
      "fm-lab",
      "display-message",
      "-p",
      "#{socket_path},#{pid},0"
    ],
    "exit": 0,
    "output": "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA/.l86yy2lau/tmux/tmux-1000/fm-lab,1986229,0\n"
  },
  {
    "scenario": "remote-parent-channel-exclusion",
    "command": [
      "bin/fm-wake-drain.sh"
    ],
    "exit": 0,
    "output": "UNREAD STATUS (new since last drain, not re-printed after this presentation):\ndemo note: deployment probe complete\n"
  },
  {
    "scenario": "remote-parent-channel-exclusion",
    "command": [
      "bash",
      "-c",
      ". bin/fm-wake-lib.sh; fm_recovery_marker_publish \"$STATE/.watcher-down\" downtime"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "remote-parent-channel-exclusion",
    "state": "remote parent channel excluded while local status is presented",
    "files": {
      ".watcher-down": "acked:downtime:1987084.1794232396.PxUc5T\n",
      ".wake-queue": "",
      ".status-presentation-cursor": "demo\tstrong:65028:18647279:2026-11-09 14:53:14.288031689 +0100\t32\t0\n"
    }
  },
  {
    "scenario": "remote-parent-channel-exclusion",
    "command": [
      "bin/fm-watch-arm.sh",
      "--stop"
    ],
    "exit": 0,
    "output": "watcher: stopped pid=1987147\n"
  },
  {
    "scenario": "remote-parent-channel-exclusion",
    "command": [
      "bash",
      "-c",
      ". bin/fm-wake-lib.sh; fm_recovery_marker_publish \"$STATE/.watcher-down\" downtime"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "remote-parent-channel-exclusion",
    "state": "new local failure remains recoverable",
    "files": {
      ".watcher-down": "announced:downtime:1987147.1794232397.PEgEt5\n",
      ".wake-queue": "",
      ".status-presentation-cursor": "demo\tstrong:65028:18647279:2026-11-09 14:53:14.288031689 +0100\t32\t0\n"
    }
  },
  {
    "scenario": "remote-parent-channel-exclusion",
    "result": "pass"
  },
  {
    "scenario": "remote-parent-channel-exclusion",
    "command": [
      "tmux",
      "-L",
      "fm-lab",
      "kill-server"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "host-only-scope-and-actor-grants",
    "command": [
      "bin/fm-lab-home.sh",
      "create",
      "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA/.lnbg1on92"
    ],
    "exit": 0,
    "output": "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA/.lnbg1on92\n"
  },
  {
    "scenario": "host-only-scope-and-actor-grants",
    "command": [
      "tmux",
      "-L",
      "fm-lab",
      "new-session",
      "-d",
      "-s",
      "watcher-lab",
      "-x",
      "120",
      "-y",
      "36",
      "-c",
      "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA",
      "bash"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "host-only-scope-and-actor-grants",
    "command": [
      "tmux",
      "-L",
      "fm-lab",
      "display-message",
      "-p",
      "#{socket_path},#{pid},0"
    ],
    "exit": 0,
    "output": "~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA/.lnbg1on92/tmux/tmux-1000/fm-lab,1988683,0\n"
  },
  {
    "scenario": "host-only-scope-and-actor-grants",
    "command": [
      "bash",
      "-c",
      ". bin/fm-wake-lib.sh; fm_wake_append signal demo.status \"signal: $STATE/demo.status\"; fm_wake_append check merge \"check: merge landed: manual check\""
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "host-only-scope-and-actor-grants",
    "command": [
      "node",
      "bin/fm-branch-dispatch.mjs",
      "offer"
    ],
    "exit": 0,
    "output": "eligible=1\nstatus=safe\ncorrupted=0\nrows=1\ntasks=demo\nunscoped=0\n"
  },
  {
    "scenario": "host-only-scope-and-actor-grants",
    "command": [
      "node",
      "bin/fm-branch-dispatch.mjs",
      "offer"
    ],
    "exit": 0,
    "output": "eligible=0\nstatus=safe\ncorrupted=0\nrows=1\ntasks=demo\nunscoped=0\n"
  },
  {
    "scenario": "host-only-scope-and-actor-grants",
    "command": [
      "node",
      "--input-type=module",
      "-e",
      "import {branchOfferForWake} from \"./.pi/extensions/lib/fm-branch-dispatch.ts\"; for(const afk of [false,true]) console.log(JSON.stringify({afk,...branchOfferForWake(process.env.FM_HOME+\"/state\",\"check: rearm-resurface\",afk)}));"
    ],
    "exit": 0,
    "output": "{\"afk\":false,\"scope\":{\"status\":\"safe\",\"eligible\":true,\"projects\":[\"demo\"],\"eligibleSeqs\":[\"1\"],\"eligibleTasks\":[\"demo\"],\"corrupted\":false,\"needsDecisionKeys\":[],\"checkSeqs\":[],\"heartbeatSeqs\":[],\"taskByWakeKey\":{\"demo\":\"demo\",\"demo.status\":\"demo\",\"demo.turn-ended\":\"demo\",\"fm-demo\":\"demo\"}},\"heartbeat\":false,\"eligible\":false,\"awayOnly\":false}\n{\"afk\":true,\"scope\":{\"status\":\"safe\",\"eligible\":true,\"projects\":[\"demo\"],\"eligibleSeqs\":[\"1\",\"2\"],\"eligibleTasks\":[\"demo\"],\"corrupted\":false,\"needsDecisionKeys\":[],\"checkSeqs\":[\"2\"],\"heartbeatSeqs\":[],\"taskByWakeKey\":{\"demo\":\"demo\",\"demo.status\":\"demo\",\"demo.turn-ended\":\"demo\",\"fm-demo\":\"demo\"}},\"heartbeat\":false,\"eligible\":true,\"awayOnly\":true}\n"
  },
  {
    "scenario": "host-only-scope-and-actor-grants",
    "command": [
      "bin/fm-wake-grant.sh",
      "activate",
      "1968111",
      "live-scope"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "host-only-scope-and-actor-grants",
    "command": [
      "bin/fm-wake-grant.sh",
      "publish",
      "live-scope",
      "1"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "host-only-scope-and-actor-grants",
    "command": [
      "bin/fm-wake-drain.sh"
    ],
    "exit": 0,
    "output": "1794232398\t1\tsignal\tdemo.status\tsignal: ~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA/.lnbg1on92/state/demo.status\nWAKE_ACK_REQUIRED: after handling completes run bin/fm-wake-drain.sh --ack-through 1 --recovery-generation 1988687.1794232398.5Y2k0u\n"
  },
  {
    "scenario": "host-only-scope-and-actor-grants",
    "command": [
      "bin/fm-wake-drain.sh",
      "--ack-through",
      "2",
      "--recovery-generation",
      "1988687.1794232398.5Y2k0u"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "host-only-scope-and-actor-grants",
    "state": "branch ack preserves original main-owned row 2",
    "files": {
      ".watcher-down": "pending:handling:1988687.1794232398.5Y2k0u\n",
      ".wake-queue": "1794232398\t2\tcheck\tmerge\tcheck: merge landed: manual check\n"
    }
  },
  {
    "scenario": "host-only-scope-and-actor-grants",
    "command": [
      "bin/fm-wake-grant.sh",
      "deactivate",
      "1968111",
      "live-scope"
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "host-only-scope-and-actor-grants",
    "command": [
      "bash",
      "-c",
      ". bin/fm-wake-lib.sh; fm_wake_append signal demo.status \"signal: $STATE/demo.status\""
    ],
    "exit": 0,
    "output": ""
  },
  {
    "scenario": "host-only-scope-and-actor-grants",
    "command": [
      "node",
      "bin/fm-branch-dispatch.mjs",
      "offer"
    ],
    "exit": 0,
    "output": "eligible=0\nstatus=unsafe\ncorrupted=0\nrows=\ntasks=\nunscoped=0\n"
  },
  {
    "scenario": "host-only-scope-and-actor-grants",
    "command": [
      "node",
      "bin/fm-branch-dispatch.mjs",
      "offer",
      "--afk"
    ],
    "exit": 0,
    "output": "eligible=0\nstatus=unsafe\ncorrupted=1\nrows=\ntasks=\nunscoped=0\n"
  },
  {
    "scenario": "host-only-scope-and-actor-grants",
    "result": "pass"
  },
  {
    "scenario": "host-only-scope-and-actor-grants",
    "command": [
      "tmux",
      "-L",
      "fm-lab",
      "kill-server"
    ],
    "exit": 0,
    "output": ""
  }
]
Evidence: Real Claude launch blocked at workspace trust

Source: Real Claude launch blocked at workspace trust


────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 Accessing workspace:

 ~/.no-mistakes/worktrees/7f0ec18181b6/01M707ZYJDNYM24B7YH8M5C8GA

 Quick safety check: Is this a project you created or one you trust? (Like your own code, a well-known open source
 project, or work from your team). If not, take a moment to review what's in this folder first.

 Claude Code'll be able to read, edit, and execute files here.

 Security guide

 ❯ No, exit
   Yes, I trust this folder

 Enter to confirm · Esc to cancel
Evidence: Verification details and separate known-baseline note

Source: Verification details and separate known-baseline note

Scope: shared tracked row 3 recovery changes only. No source or test files changed in this phase.

Targeted baseline checks executed in this phase:
- bash tests/fm-supervision-host-drain.test.sh (all registered drain behavior cases passed).
- tests/fm-supervision-host.test.sh selectors: test_empty_settled_recovery_uses_no_engine_turn, test_attended_recovery_handles_original_rows_without_waking_main, test_away_turn_without_a_report_hands_the_wake_to_main (passed; engine is explicitly a stub, not live model evidence).

Live product evidence: live-recovery-driver.py drives actual fm-watch-arm, fm-wake-drain, fm-branch-dispatch, fm-wake-grant, and fm-branch-outcome commands in marked disposable homes, with real tmux servers on private sockets. No fake executable, model, login, backend, or engine was used. Seeded state files are input protocol records. All nine live cases passed on the final run. Full command outputs and state snapshots are in live-recovery-transcript.json. Labs and private tmux servers were removed in the same run; git status is clean.

Driver setup corrections before the final run: shortened disposable-home names to fit Unix socket limits; supplied the recovery generation required by acknowledgement; used fm-watch-arm --stop for orderly cleanup; primed the existing status through a real watcher and then removed the presentation cursor before starting the interrupted recovery, ensuring the initial recovery needed main while the later recovery had positive status evidence. These were driver setup/assertion issues. The final run reproduced empty-queue interrupted handling with the failure note still present and proved the generation remained unacknowledged until the explicit generation-bound ack.

Real Claude primary attempt: launched the installed claude CLI as the session command on a 120x36 private tmux terminal in a marked disposable home, with the runbook's environment overrides removed. It stopped at workspace trust (claude-primary-launch.txt). The adapter forbids answering that dialog with keys, and the workspace boundary forbids modifying user-level trust configuration. No trust or credential changes were made. A person must approve this worktree in Claude and rerun the disposable-lab check to validate actual model handling of recovered rows. This remains the previously declined live-engine coverage limitation, not a new finding.

Previously supplied baseline evidence, not rerun here: fm-pi-branch-extension.test.sh / broken-branch settlement must return delivery ownership to the watcher reportedly fails identically on candidate and unchanged main 5d6b207ff0edd67f27b130c27072795d753c638a with 'Error: branch settlement did not expose the startup failure: Error: supervision session no longer owns the fleet lock'. This unrelated baseline failure was explicitly excluded from fixes and is separate from the checks passed above.

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed ✅
  • ⚠️ .pi/extensions/lib/fm-branch-dispatch.ts:644 - Parts of this change go beyond what the intent asks for. The intent (row 3) says to "offer original eligible task rows to the host". But isRecoveryTrigger in branchOfferForWake does not depend on attendedHost, so the Pi primary watcher also starts offering attended check: rearm-resurface closes to the Pi branch. It calls branchOfferForWake(state, message, afk) without attendedHost at .pi/extensions/fm-primary-pi-watch.ts:756. The same Pi-side widening appears in three other places: (1) the new recovery whole-log scope and the throw-to-main path in the Pi branch turn start (.pi/extensions/fm-branch-supervision.ts:1552-1567); (2) the afk-path change that passes isRecoveryTrigger into the attended re-scan, so an away Pi recovery close is no longer awayOnly (.pi/extensions/lib/fm-branch-dispatch.ts:661); (3) the docs/pi-supervision-branch.md:99-101 rewrite. No stated requirement needs Pi-primary recovery offering. The narrower form would gate the recovery exception on the host path (attendedHost &amp;&amp; isRecoveryTrigger) and leave Pi's existing check-trigger rule and enqueueWake unchanged. The tradeoff: this breaks the documented one-rule parity between Pi and the host. So ask whether Pi parity is wanted, or whether the Pi-side changes should be removed.

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 9 of 10 scenarios driven live against the product
Scenario Result Live Evidence
Rearm proven-empty recovery: retire its generation without a wake and keep the watcher running ✅ pass live Live CLI outputs and persisted recovery state: settled-empty-no-wake
Rearm without presentation evidence: retain recovery and wake main ✅ pass live Live CLI outputs and persisted recovery state: uncertain-recovery--no-cursor
Rearm with unread failure status: retain recovery and wake main ✅ pass live Live CLI outputs and persisted recovery state: uncertain-recovery--unread-status
Rearm with an open blocker buried beneath newer prose: preserve the decision and wake main ✅ pass live Live CLI outputs and persisted recovery state: uncertain-recovery--open-decision
Rearm after an outcome was read but not processed: refuse empty settlement ✅ pass live Live CLI outputs and persisted recovery state: uncertain-recovery--unprocessed-outcome
Rearm with corrupt outcome evidence: preserve recovery and wake main ✅ pass live Live CLI outputs and persisted recovery state: uncertain-recovery--corrupt-outcome
Interrupt handling after status presentation: preserve the same generation across watcher close until explicit acknowledgement ✅ pass live Live CLI outputs and persisted recovery state: interrupted-handling-needs-ack
Rearm a remote mate: exclude its parent channel while preserving recovery for new local failures ✅ pass live Live CLI outputs and persisted recovery state: remote-parent-channel-exclusion
Offer recovery rows through host dispatch: preserve sequence IDs and main-owned rows, reject unrelated checks, and retain Pi's existing boundary ✅ pass live Live CLI outputs and persisted recovery state: host-only-scope-and-actor-grants
Have the real attended Claude engine handle eligible recovery rows and return failures to main ⏸️ untested no The installed Claude CLI stopped at this worktree's workspace-trust dialog. The harness-adapters skill (.agents/skills/harness-adapters/SKILL.md), through its Claude reference, instructs: “Never try t…
  • bash tests/fm-supervision-host-drain.test.sh
  • bash -c '. tests/supervision-host-helpers.sh; fm_test_run() { for selected in test_empty_settled_recovery_uses_no_engine_turn test_attended_recovery_handles_original_rows_without_waking_main test_away_turn_without_a_report_hands_the_wake_to_main; do "$selected"; done; }; . tests/fm-supervision-host.test.sh'
  • python3 ~/.no-mistakes/evidence/01M707ZYJDNYM24B7YH8M5C8GA/live-recovery-driver.py
  • Launched installed claude on a private fm-lab tmux socket with a 120x36 terminal, captured its workspace-trust screen, and removed the disposable lab.
  • git status --short confirmed a clean worktree after lab cleanup.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant