Repository navigation
fix: record away posture immediately on /afk - #5260
Merged
Merged
Conversation
Collapse the propose-then-confirm away entry into one 'enter' step that writes state/.afk-contract immediately and prints the announcement and read-back after the record exists, never asking for a go. The retired propose, confirm, and --proposal inputs are refused by name, and a stale proposal left by an older version is removed rather than promoted. Refresh and replace semantics, verbatim words, the single writer, the never-set, and per-harness launch behavior are unchanged.
BohnBawerick
added a commit
to BohnBawerick/firstmate
that referenced
this pull request
Sep 23, 2026
Intent
Change the away-mode entry so that typing /afk is itself the go: do not wait for a second confirmation. The person who typed /afk may not look at the screen again, so entry must not depend on a further human response.
Required behavior:
Keep the safety boundaries unchanged: destructive, irreversible, and security-sensitive actions stay not pre-authorizable whatever the away words say, and a failed test is never waived by away words.
This is a captain-directed change to away-mode entry semantics. It is not one of the no-mistakes workflow-exemption pull requests, so the normal no-mistakes gate applies in full.
What Changed
entercommand that atomically writesstate/.afk-contractbefore announcing entry and printing a non-blocking read-back.propose,confirm, and--proposal; preserve wordless refreshes while archiving and replacing the mandate when new away words are supplied.Risk Assessment
✅ Low: The change cleanly replaces the two-step proposal/confirmation flow with an atomic same-turn entry while preserving record validation, locking, lifecycle behavior, and existing safety gates.
Testing
Targeted contract, merge-safety, and branch-supervision checks passed. A live isolated Pi CLI run showed the record existed before the first output, emitted only a non-blocking read-back, rejected the retired confirmation command, and archived cleanly on return. Safety-boundary behavior was not driven against the live product. The broader launcher test’s non-Pi cases could not run under this Pi-owned process tree.
OBSERVED_AT_FIRST_OUTPUT,RECORD_VALID, andPROPOSAL_EXISTSobservationsHARNESS=pi,LIVE_RECORD_EXISTS=yes, and no daemon flag or terminal recordCONFIRM_EXIT=2and directs callers to same-turnenterfm-harness.shcorrectly gives ancestry precedence over synthetic Claude markers. Re-runtests/fm-afk-launch.test.shfrom a Claude or Grok process tree to…Evidence: Live same-turn AFK entry and lifecycle transcript
Source: Live same-turn AFK entry and lifecycle transcript
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
OBSERVED_AT_FIRST_OUTPUT,RECORD_VALID, andPROPOSAL_EXISTSobservationsHARNESS=pi,LIVE_RECORD_EXISTS=yes, and no daemon flag or terminal recordCONFIRM_EXIT=2and directs callers to same-turnenterfm-harness.shcorrectly gives ancestry precedence over synthetic Claude markers. Re-runtests/fm-afk-launch.test.shfrom a Claude or Grok process tree to…tests/fm-afk-contract.test.shtests/fm-pr-merge.test.shbash tests/fm-branch-supervision.test.shLive isolated CLI flow usingbin/fm-afk-launch.sh enter,confirm, andstop, with record-state checks at first outputPATH=/usr/bin:/bin bash tests/fm-afk-launch.test.sh(entry checks passed; non-Pi daemon cases were inapplicable because harness ancestry remained Pi)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.