Skip to content

fix: renew idle Claude watcher cycles before hook timeout - #6129

Open
d1on wants to merge 14 commits into
kunchenguid:mainfrom
d1on:fm/fm-claude-idle-secondmate-8h-hook-blind
Open

d1on wants to merge 14 commits into
kunchenguid:mainfrom
d1on:fm/fm-claude-idle-secondmate-8h-hook-blind

Conversation

@d1on

@d1on d1on commented Sep 29, 2026 •

Copy link
Copy Markdown

Problem

An idle Claude primary (a main home or a secondmate home) that runs the plain Stop-hook arm stops being supervised after about eight hours.
Since #6124 the supervision host is the default for Claude primaries and already ends its own park before the hook timeout, so this affects homes that opt out of the host (config/supervision-host-off present), and any home that ran the plain arm before that change.
The Stop-owned auto-arm (bin/fm-claude-stop-autoarm.sh) runs as an asyncRewake Stop hook registered with timeout: 28800.
On an idle home the watcher cycle never closes, because no-change heartbeats are absorbed without ending the park.
At 28800 seconds Claude terminates the hook's process tree, and the #4474 trap records the failure and exits 2, but Claude does not deliver the exit 2 of a hook it terminated at its own timeout (measured in docs/verification/supervision.md).
No turn starts, so nothing re-arms, and the home stays unwatched until the next inbound message.
The supervision host bounds its own park below the timeout; the plain hook-owned arm did not.

Fixes #5718

Fix

  • The hook ends its own quiet park at a fixed 27000-second boundary, measured from the firing's start and checked every second.
  • At the boundary it stops only the watcher of its own cycle, through a new identity-bound bin/fm-watch-arm.sh --stop-if-watcher PID IDENTITY that leaves any other cycle's lock untouched, then starts a handling successor so the short renewal turn stays covered.
    Only the generation that still owns supervision applies the boundary: a superseded firing takes no boundary action (no TERM to its arm and no scoped stop) and waits for its arm to close, exactly as on main, so it never stops a watcher a newer firing may be following.
  • It delivers one check: cycle-renewal rewake while Claude still honors exit 2; the renewal turn drains, handles anything the drain presents, acknowledges, and ends, and that turn's end arms the next bounded park.
    When a real watcher reason reached the hook at the boundary, that reason is delivered as an ordinary wake without the renewal line.
  • Every wait after the boundary is bounded so the rewake always commits before the registration: reaping the arm escalates from TERM to KILL within five seconds, and the successor's confirmation wait stops at 28770 seconds elapsed.
  • The fix(bin): translate Stop hook timeout signals into durable auto-arm failure #4474 HUP/TERM/INT translation stays as defense in depth, and the supervision host keeps its own boundary.
  • Docs: docs/turnend-guard.md, docs/supervision-host.md, docs/watcher-continuity.md, and docs/supervision-protocols/claude.md describe the boundary and the renewal wake.

Tests

  • tests/fm-claude-stop-autoarm.test.sh drives the hook with a test-only elapsed clock, honored only under FM_TEST_SEAM=1:
    test_quiet_park_renews_at_the_park_boundary, test_boundary_real_event_has_no_renewal_label, test_park_boundary_reaps_term_resistant_arm_before_deadline, test_renewal_caps_unconfirmed_successor_wait, test_superseded_boundary_does_not_stop_the_watcher, and test_park_clock_requires_the_test_marker.
  • tests/fm-watch-arm.test.sh runs a real arm and watcher: test_scoped_stop_preserves_other_cycle_lock.
  • Each scenario test was checked to fail once its guard is removed from the implementation; with the boundary removed, the hook never returns.
  • Live versus automated coverage:
    • Driven live: the scoped watcher stop, and the core idle renewal against a real Claude Code 2.1.303 primary in a disposable lab with the boundary lowered locally to 180 seconds (park armed, boundary TERM, check: cycle-renewal rewake delivered and handled, next cycle armed; see the evidence comment on this PR).
    • Proven by automated tests only, not live: a watcher event at the boundary arriving without a misleading renewal label (test_boundary_real_event_has_no_renewal_label); a resistant arm or unconfirmed successor not consuming the hook budget (test_park_boundary_reaps_term_resistant_arm_before_deadline, test_renewal_caps_unconfirmed_successor_wait); and a superseded firing leaving its started arm and shared watcher alone (test_superseded_boundary_does_not_stop_the_watcher).

Known edge cases left for a follow-up

These behave exactly as on main and are out of scope here, because a durable fix needs watcher coverage outside the hook-owned process group:

  • Overlapping-firing handoff: when a newer Stop firing supersedes a still-running firing whose arm started the watcher, that watcher remains a child of the older firing's arm in its hook's process group; this PR leaves it alone, but it still ends if Claude terminates the older hook at its own timeout, as on main.
  • Away-mode takeover during a park: if away mode begins while a hook-owned park is running, the boundary still ends that hook's arm and its watcher.

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

🔧 **Rebase** - 1 issue found → auto-fixed ✅
  • ⚠️ bin/fm-watch-arm.sh - merge conflict rebasing onto origin/main

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

✅ **Review** - passed

✅ No issues found.

⚠️ **Test** - 1 warning
  • ⚠️ live validation verdict: inconclusive (1 of 5 scenarios were driven live against the product); untested: An idle Claude second mate renews before timeout with a covering successor, A real event delivered at the park boundary appears without an additional renewal label, A resistant arm or unconfirmed successor cannot consume the renewal hook budget, A superseded firing leaves its started arm and shared watcher alone at the boundary
  • Live validation: ⚠️ inconclusive - 1 of 5 scenarios driven live against the product
Scenario Result Live Evidence
An idle Claude second mate renews before timeout with a covering successor ⏸️ untested no Launched the installed, authenticated Claude in a marked disposable home through the prescribed private tmux socket. Claude responded, but the required gate worktree failed the genuine-primary predica…
A real event delivered at the park boundary appears without an additional renewal label ⏸️ untested no The focused executable regression passed, but uses an arm fixture. The real Claude lab launch remained outside primary scope, so no live hook cycle could be driven to an event boundary. An authorized…
A resistant arm or unconfirmed successor cannot consume the renewal hook budget ⏸️ untested no Both injected-failure regressions passed. The real Claude launch could not enter supervision from this linked worktree, preventing a live hook-budget exercise. An authorized genuine-primary lab with c…
A superseded firing leaves its started arm and shared watcher alone at the boundary ⏸️ untested no The started-arm regression passed with a child watcher and TERM forwarding, but that arm is a stub. The attempted real Claude session remained primary-scope-ineligible. An authorized genuine-primary l…
A scoped stop preserves another watcher cycle and stops only its matching cycle ✅ pass live scoped-stop-live.log
  • Executed six focused cases from tests/fm-claude-stop-autoarm.test.sh: quiet renewal, boundary event, successor budget, TERM-resistant arm, superseded boundary, and clock-seam guard.
  • Executed test_scoped_stop_preserves_other_cycle_lock from tests/fm-watch-arm.test.sh.
  • Drove real bin/fm-watch-arm.sh --stop-if-watcher against a disposable marked lab: mismatched identity, mismatched PID, and matching cycle.
  • Launched Claude 2.1.309 on the prescribed private tmux socket with a 100x32 grid; submitted a no-tools prompt, captured its response and lab state, and checked primary-scope eligibility.
  • Stopped lab processes, removed disposable fixtures and temporary test runners, and confirmed a clean worktree.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@greptile-apps

greptile-apps Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High risk] Adds a new watcher-stop mode to the supervision hook system.

The PR appears safe to merge; no new actionable issue or outstanding previous finding remains.

Reviews (5) · Last reviewed commit: "no-mistakes(ci): Fixed ci-1 by checking ..."

Comment thread bin/fm-claude-stop-autoarm.sh Resolved
Comment thread bin/fm-claude-stop-autoarm.sh Resolved
Comment thread bin/fm-claude-stop-autoarm.sh Resolved
Comment thread bin/fm-claude-stop-autoarm.sh Resolved
@d1on
d1on force-pushed the fm/fm-claude-idle-secondmate-8h-hook-blind branch from 9ae8551 to 0274f96 Compare September 30, 2026 03:37
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: triage on HEAD 0274f965190176b9e5be85fcb81d3de29dfaa985.

closesReadyForPr: VERIFIED against #5718. Issue asks for a voluntary park bound below Claude's 28800s Stop-hook timeout on the plain arm (Claude drops the #4474 exit-2 of a timed-out hook; idle homes go unsupervised). Body Fixes #5718 matches: park boundary at 27000s, identity-scoped --stop-if-watcher, check: cycle-renewal rewake, successor budget capped at 28770s elapsed. Not just a closing-link sort hint.

contract-class: new-default. Main tip header still says the plain arm does not shorten a quiet park; host already owns its own boundary and is the Claude default. This hardcodes PARK_SECONDS=27000 and a renewal wake on the shared run_arm path (including homes that opted out of the host). VISION peace-of-mind / "homes should stay supervised" does not make restore (FM-LEARN-4627). New always-on renewal wake class on the plain-arm path → new-default. No auto-merge.

VISION (brief): One captain/interface aligns (continuity without new captain surface). Authority aligns (no new consent assumption beyond existing Stop arm). Scripts/agents aligns (deterministic boundary in scripts). Restart aligns (ledger/successor unchanged). Delegation N/A. Fleet-outlives-vendor aligns (Claude-specific measured adapter debt, documented). Scope aligns (command-layer supervision continuity, not workshop). Align paragraph: deepens looking-away confidence for idle Claude homes; resist risk is new default-on wake noise on the opt-out plain arm.

Attestation: MATCH (0274f965…). workflow-zero: yes. CI: first-time fork runs approved this pass (36665842719, 36665233092, 36665233093); NM body-compliance SUCCESS; full CI queued. Greptile ignored (repo does not use it).

Waiting on: CI to finish. Even if green: new-default → no auto-merge; Firstmate flag only once otherwise-ready.

@d1on
d1on force-pushed the fm/fm-claude-idle-secondmate-8h-hook-blind branch from 0274f96 to 7cd3c8a Compare October 2, 2026 03:39
@d1on d1on changed the title fix: renew idle Claude watcher cycles before hook timeout fix: renew quiet Claude watcher parks before hook timeout Oct 2, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: re-triage vs tip 241d4617d6c160471d7da8ffe637b59f8f4a7af9. Closes ready-for-pr #5718: yes (idle Claude plain Stop-arm goes unsupervised after ~8h when Claude drops exit-2 of a timed-out hook; tip adds 27000s park boundary + check: cycle-renewal rewake + identity-scoped --stop-if-watcher).

HEAD e3ca782ca0cf731a365ee5cfe27db438dc1a8859. MERGEABLE/UNSTABLE. Attestation: MATCH (review/test/document/lint completed). Greptile SUCCESS on this head (prior P1s on away-mode/superseded stop addressed; author closed remaining started-arm edge as generation-gated + documented).

contract-class: new-default (unchanged). Main tip still documents that the plain arm does not shorten a quiet park; the supervision host already owns its own boundary and is the Claude default. This hardcodes PARK_SECONDS=27000 and a renewal wake on the shared run_arm path (including homes that opted out of the host via config/supervision-host off). VISION peace-of-mind / "homes should stay supervised" does not make restore (FM-LEARN-4627). New always-on renewal wake class on the plain-arm path → new-default. No auto-merge.

VISION.md (per-rule)

  • One captain / interface: aligns — continuity without new captain chatter beyond the renewal drain line.
  • Authority: aligns — no new consent assumption beyond the existing Stop arm; but changing the unconfigured plain-arm park is still a default-behavior change.
  • Scripts / judgment: aligns — deterministic boundary in script.
  • Restart non-event: aligns — durable renewal.
  • Delegation / Fleet / Scope: aligns — Claude Stop-hook adapter mechanics.

This pass: approved fork CI 36961956505 and NM 36961956540/36962185284. CI+NM queued — waiting-ci. Firstmate flag: no yet (not otherwise-ready; CI in flight). When green, flag Firstmate for captain close-vs-leave on this new-default — do not auto-merge.

@d1on

d1on commented Oct 2, 2026

Copy link
Copy Markdown
Author

The one cancelled check, "Behavior portable serial 2", hit the job's 30-minute limit with no test failures: every script in the shard finished with exit 0, and tests/fm-supervision-host.test.sh alone took 1,596 s.
That test is slow on main as well: 1,478 s in the main CI run that started in the same minute (its shard finished at 27m49s, just under the limit), and 852 to 971 s in earlier main runs.
This PR does not change the supervision host or that test, so a re-run of the cancelled job should pass.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: re-triage vs tip f50e9cdba5e1 (#5963). Closes ready-for-pr #5718: yes (idle Claude plain Stop-arm goes unsupervised after ~8h when Claude drops exit-2 of a timed-out hook; tip adds 27000s park boundary + check: cycle-renewal rewake + identity-scoped --stop-if-watcher).

HEAD e3ca782ca0cf731a365ee5cfe27db438dc1a8859. MERGEABLE/UNSTABLE. Attestation: MATCH. Greptile SUCCESS. NM 36961956540 SUCCESS.

CI: prior attempt cancelled serial 2 at 30m job limit with all tests exit 0 (author note; fm-supervision-host ~1596s, also slow on main). This pass re-ran failed jobs on 36961956505 (attempt 3): all shards SUCCESS except Behavior portable serial 2 still pending. Not otherwise-ready yet.

contract-class: new-default (unchanged). Main tip still documents that the plain arm does not shorten a quiet park; the supervision host already owns its own boundary and is the Claude default. This hardcodes PARK_SECONDS=27000 and a renewal wake on the shared run_arm path (including homes that opted out via config/supervision-host off). VISION peace-of-mind does not make restore (FM-LEARN-4627). No auto-merge.

VISION.md (per-rule)

  • One captain / interface: aligns — continuity without new captain chatter beyond the renewal drain line.
  • Authority: aligns as no new consent assumption beyond the existing Stop arm; changing the unconfigured plain-arm park is still a default-behavior change.
  • Scripts / judgment: aligns — deterministic boundary in script.
  • Restart non-event: aligns — durable renewal.
  • Delegation / Fleet / Scope: aligns — Claude Stop-hook adapter mechanics.

This pass: fork CI approved: no (already approved prior; re-ran cancelled). Firstmate flag: no yet (CI not green). When tip is fully green, flag Firstmate for captain close-vs-leave — never auto-merge. waiting-ci.

@d1on
d1on force-pushed the fm/fm-claude-idle-secondmate-8h-hook-blind branch from e3ca782 to 1cbdaf4 Compare October 19, 2026 22:03
@d1on d1on changed the title fix: renew quiet Claude watcher parks before hook timeout fix: renew idle Claude watcher cycles before hook timeout Oct 19, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: re-triage on the rebased head 1cbdaf4d48f6.

Thanks @d1on for keeping this current — the ownership gate before any boundary action (superseded firings now leave the arm and watcher alone) reads cleanly, and the identity-scoped --stop-if-watcher only touches the lock it was handed.

Closes #5718: verified from your body (idle Claude plain Stop-arm goes unsupervised after ~8h because Claude drops the exit 2 of a hook it timed out; this adds the 27000s park boundary + check: cycle-renewal rewake).

CI: this head's fork workflow runs were waiting for approval; I reviewed the diff (bin/tests/docs only, no workflow or secret surface) and approved them, so CI and the no-mistakes check are running now.

contract-class: new-default (unchanged from earlier passes). It adds a renewal wake and a hardcoded park boundary on the plain-arm path that homes opted out of the supervision host run by default; that is a new wake on an existing default path, so it is a captain decision once green, not an auto-merge.

One ask, whenever you have a moment: the attestation's live validation is inconclusive (1 of 5 driven live). I know the 8-hour idle case is awkward to drive, but if you can post real-harness evidence for the idle renewal on this revision (for example a real Claude primary run with the boundary lowered through a local, non-shipped tweak, plus the resulting check: cycle-renewal turn and the next armed cycle), or re-raise through no-mistakes with that scenario driven live, that gives the captain what he needs to decide. Nothing else is needed from you right now.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks, @d1on. I looked at the new head 621170b5. Its one commit is a test-only fix to tests/fm-remote-secondmate-lifecycle-e2e.test.sh, giving the observer the relaunch's full 120-second budget instead of a 30-second deadline. It's the same lifecycle flake other PRs hit, so that's a welcome fix.

CI: this head's fork runs were waiting for approval again. I reviewed the delta (test file only, no workflow or secret surface) and approved CI 39390237548 and Require no-mistakes 39390237621. They are running now.

Contract-class is unchanged: new-default (a new check: cycle-renewal wake and a hardcoded park boundary on the plain-arm path). Once it's otherwise ready it's a captain merge-or-leave decision, not an auto-merge.

Still waiting on you for one thing: the attestation's live validation is still inconclusive (1 of 5 driven live). The ask from my earlier comment stands, whenever you can get to it: real-harness evidence of the idle renewal (the check: cycle-renewal turn and the next armed cycle), or a no-mistakes re-raise with that driven live. Nothing else is needed from you.

@d1on

d1on commented Oct 20, 2026

Copy link
Copy Markdown
Author

Real-harness evidence for the idle renewal on head 621170b5 (hook and arm code identical to 1cbdaf4d).

Setup. A disposable lab from bin/fm-live-lab.sh up --harness claude --supervision-host off on a private tmux server: a real Claude Code 2.1.303 primary (sonnet) on the plain Stop-hook arm, with config/supervision-host-off present.
The park boundary was lowered locally for this drive only: in the lab home's copy, PARK_SECONDS=27000 became PARK_SECONDS=180, uncommitted and discarded at teardown; nothing in this PR changed.
A trusted no-op custom check kept the home needing supervision without ever waking it.

What happened (UTC):

10:33:41Z drive prompt sent; the primary replied IDLE-READY and ended its turn
10:33:47Z park armed:       epoch=1 outcome=arming   (watcher pid 97200)
10:36:45Z boundary reached: the arm was TERMed 179 s after it started
           cycle ledger: watcher_pid=97200 origin=started exit_code=143 reason=arm-interrupted successor=started:19840
10:36:47Z rewake delivered: epoch=1 outcome=rewake session_pid=46906
10:36:57Z next cycle armed: epoch=2 outcome=arming   (watcher pid 19840)

Delivered Stop hook feedback (from the session transcript, 10:36:47Z):

firstmate watcher wake - one supervision event needs a handling turn now.
check: cycle-renewal - the Stop hook ended this watcher cycle at its park boundary before the hook timeout; drain, handle anything the drain presents, acknowledge, and end the turn; the next cycle arms on its own

The handling turn in the primary's pane:

⏺ Stop hook feedback
⏺ Bash(bin/fm-wake-drain.sh)
  ⎿  WAKE_ACK_REQUIRED: after handling completes run bin/fm-wake-drain.sh --ack-through 0 --recovery-generation 97200.1792492605.UegH9D
⏺ Bash(bin/fm-wake-drain.sh --ack-through 0 --recovery-generation 97200.1792492605.UegH9D)
  ⎿  (No output)

The turn then ended, and that Stop armed the next bounded park (epoch 2, above), covered in between by the successor watcher 19840.
The edge-case scenarios (boundary event, resistant arm or unconfirmed successor, superseded firing) remain covered by the deterministic tests named in the description.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thank you @d1on, that live run is exactly what I asked for. It shows a real Claude Code primary on the plain Stop-hook arm reaching the park boundary, receiving the check: cycle-renewal wake, draining and acknowledging it, and arming the next cycle (epoch 2) with the successor watcher covering the gap. Lowering PARK_SECONDS to 180 in the lab copy only, and saying so, is the right way to drive a 7.5-hour boundary. That closes my live-validation ask.

Where head 621170b5 stands:

  • All 19 checks are green, including CI 39390237548 and PR must be raised via no-mistakes. The attestation binds this head.
  • GitHub reports it as mergeable and clean against main.
  • Closes #5718 is in the body.

Contract-class: new-default (unchanged). The unconfigured Claude plain-arm path gains a hardcoded park boundary and a new check: cycle-renewal wake. VISION: all rules align.

Status: captain-decision hold. This is not waiting on you. It is otherwise ready, and because it changes default behavior, Kun decides whether it lands.

@d1on
d1on force-pushed the fm/fm-claude-idle-secondmate-8h-hook-blind branch from 621170b to f3ef369 Compare October 24, 2026 10:55
@d1on d1on changed the title fix: renew idle Claude watcher cycles before hook timeout fix: renew quiet Claude watcher cycles before hook timeout Oct 24, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @d1on for pushing a fresh head.

I compared f3ef3691 with 621170b5, the head I last reviewed. It's the same series, rebased onto 25bb43bb. The park-boundary, ownership and scoped --stop-if-watcher code is unchanged, so your live run from Oct 20 still covers it. The no-mistakes attestation binds this head.

The branch now conflicts with main (f6b54af1), and the fork CI hasn't run on it. There are two spots:

  • bin/fm-watch-arm.sh, header comment: main added an "arm ground removed" paragraph right where you document --stop-if-watcher. Keeping both paragraphs should resolve it.
  • tests/fm-remote-secondmate-lifecycle-e2e.test.sh: main already gives the relaunch observer its full budget (watch_relaunch_timeout). Taking main's version there and dropping that part of f3ef3691 looks like the simplest fix.

Could you rebase onto current main and re-raise via git push no-mistakes? That way the attestation binds the new head. This is waiting on you for now.

Contract-class is unchanged: new-default. A hardcoded 27000s park boundary and a new check: cycle-renewal wake run on the unconfigured Claude plain-arm path. VISION aligns on every rule. Once it's rebased and green, it goes back to Kun as a merge-or-leave call, not an auto-merge.

d1on added 9 commits October 24, 2026 15:20
An idle Claude primary's plain Stop-hook park never closes, because no-change
heartbeats are absorbed, so Claude TERMs the hook at its 28800-second timeout
and drops the exit 2 the timeout trap emits. The home then stays unsupervised
until the next inbound message.

The hook now ends its own quiet park at FM_CLAUDE_AUTOARM_PARK_SECONDS
(default 27000, below the registration): it stops the home's watcher, starts a
covering handling successor, and delivers one no-event `check: cycle-renewal`
rewake while Claude still honors exit 2. The renewal turn's end arms the next
bounded park. The timeout trap stays as defense in depth, away mode is left
alone, and the opt-in supervision host keeps its own boundary.

Fixes kunchenguid#5718
…-claude-stop-autoarm.sh: away mode is checked before boundary signalling, superseded firings reap their own arm silently, and boundary arm termination is bounded with KILL escalation. Added behavioral regressions in tests/fm-claude-stop-autoarm.test.sh. The test suite, shellcheck, bash syntax checks, and git diff checks pass
A superseded Claude Stop-hook generation reaped its own arm with TERM at the
park boundary, and a started arm forwards TERM to the watcher it owns, so the
superseded firing killed the watcher a newer generation was following.

bin/fm-watch-arm.sh now treats USR1 as a release: the arm records
arm-released in the cycle ledger and exits without signalling its watcher,
which keeps running as the home's singleton. The hook's superseded path
releases its arm with USR1 (bounded, with the existing KILL fallback, which
never reaches the watcher either). The arm header also documents the
--stop-if-watcher mode the park boundary uses.

The supersession test now uses a started arm stub that forwards TERM like the
real arm, and a real-process arm test covers release against a TERM control.

Refs kunchenguid#5718
d1on added 5 commits October 24, 2026 15:20
…ision

At the park boundary the hook stopped the identity-matched watcher from its
cycle even when a newer Stop firing had superseded it. If the superseded
firing's arm had attached to the watcher the newer firing also follows, that
explicit stop ended the newer firing's cycle, which the plain arm on main
never does. The boundary now issues the scoped stop only while this
generation still owns supervision; a superseded firing stays silent and
leaves the watcher alone.

Refs kunchenguid#5718
…ny park-boundary action. Superseded firings now wait for natural arm closure, leaving the watcher untouched. Updated comments and added a started-arm regression that failed before the fix. The full auto-arm test suite, bash syntax checks, shellcheck -x, and git diff --check pass
@d1on
d1on force-pushed the fm/fm-claude-idle-secondmate-8h-hook-blind branch from f3ef369 to 6d238bb Compare October 24, 2026 14:45
@d1on d1on changed the title fix: renew quiet Claude watcher cycles before hook timeout fix: renew idle Claude watcher cycles before hook timeout Oct 24, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @d1on, that's the rebase I asked for.

I compared 6d238bb2 with f3ef3691. Commits 1–14 are the same series rebased onto f6b54af1. The two commits that changed differ only in comment context. The lifecycle-test commit is gone, so tests/fm-remote-secondmate-lifecycle-e2e.test.sh now keeps main's relaunch budget. In bin/fm-watch-arm.sh the header keeps main's paragraph and adds your --stop-if-watcher one next to it. The park-boundary, ownership and scoped-stop code is the same, so your live run from Oct 20 still covers it. It merges cleanly with main d96bff00, and no workflow files are touched.

I've approved the fork runs for this head: CI 40103917649, plus Require no-mistakes 40103917664, 40103938888 and 40104441954. They're queued now.

Contract-class: new-default (unchanged). A hardcoded 27000 s park boundary and a new check: cycle-renewal wake run on the unconfigured Claude plain-arm path. VISION: all rules align.

Status: waiting on CI. You don't need to do anything right now. Once it's green and no-mistakes binds this head, it goes back to Kun as a merge-or-leave decision, not an auto-merge.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @d1on. CI on head 6d238bb2 is now fully green.

Where it stands:

  • All 19 checks pass on 6d238bb2. Run 40103917649 hit a serial 5 fm-remote-job TERM-burst failure in an area this PR doesn't touch, and it passed on rerun.
  • The no-mistakes attestation binds this head.
  • GitHub reports it CLEAN against main 842eab16, and it merges into main without conflicts locally too.
  • Nothing has changed in the park-boundary, ownership or scoped-stop code since your live run on Oct 20, so that evidence still covers it.

Contract-class (mine): new-default (unchanged). On the unconfigured Claude plain-arm path, bin/fm-claude-stop-autoarm.sh adds a hardcoded PARK_SECONDS=27000 boundary and a new check: cycle-renewal wake. VISION: every rule aligns.

Status: captain-decision hold. This isn't waiting on you. It's otherwise ready, but because it changes default behaviour, Kun makes the merge-or-leave call. I won't merge it automatically.

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.

Claude Stop auto-arm still goes deaf after 8 hours on an idle home: the #4474 timeout trap commits the failure, but Claude drops its exit 2

2 participants