Repository navigation
fix: end away mode when captain inbox notes reach main - #42
Merged
Merged
Conversation
A queued inbox note while an away record exists is handed back to main with a supervision-host line that says away mode should end, instead of going to the away engine. Quiet mode is unchanged. Arm owners no longer label that hand-back as automatic supervision. The away prompt treats an explicit autonomy grant in the current task note as standing authority for that job only. The away daemon and the Pi branch do not apply this hand-back yet.
A note queued after the watcher's poll and before the park bound was handled as ordinary away work, so the posture stayed on. The park bound and every other hand-back to main now emit the return line when an unsurfaced note is waiting, and the protocol treats that drain row as the return. The away daemon and the Pi branch do not apply this hand-back yet.
… allows 150 seconds for the configured 120-second restart operation. Production behavior is unchanged. Full lifecycle test, pinned lint, shell syntax, and diff checks passed
peterOC26
added a commit
that referenced
this pull request
Nov 6, 2026
* fix: keep the away session visible when it never starts The Stop hook skipped the supervision host when a leftover away flag stood on a host home. The failing case is a live lock in this process, a new session id, a stale sidecar, and that flag beside an away record. Ancestry without the flag already started the host. The hook now starts the host, re-anchors the sidecar, and records that the away session did not start when the host program itself is missing. Away entry prints a read-only inventory of live work, holds, cleared blockers, green pull requests, passed and future dates, and a stop point of three failed checks, plus the read-back checklist. It arms a liveness check that stays quiet until the window has elapsed, then names a silent window once and an open blocker that had no handling and no hand-back once. The return brief repeats those lines and lists the work that was not started. When no away session is running, main records one routine outcome per handled event and keeps the existing merge, spawn, and decision gates. Follow-ups: standing away words still wait for a choice. A Jobs page note that ends away mode is already in review at #42. * no-mistakes(review): Fix away-window liveness, return cleanup, and pending-work reporting * no-mistakes(review): Recognize daemon handbacks, align blocker timing, remove inferred relaunches * no-mistakes(review): Scope blocker timing and daemon handling to away evidence * no-mistakes(review): Remove blocker-handling inference while preserving away-session liveness * no-mistakes(review): Reset away wake history and count only daemon heartbeats * no-mistakes(review): Remove away-session liveness check and associated wiring * no-mistakes(test): Decode captain hold reasons in away entry inventory * no-mistakes(document): Align away-mode documentation with retained behavior * no-mistakes(lint): Quote literal done subcommand to satisfy ShellCheck * fix: keep away return next steps and future checks honest Name an unreadable backlog in the Not started section instead of an empty list. List each live explicit next command once, and leave held rows without that command in Waiting on you. Key a future-date check on the task and its hold date so a later deferral fires again. Read the backlog once per render. * no-mistakes(review): Omit truncated next commands and enforce byte budgets * no-mistakes(test): Accept healthy empty backlogs in away-mode inventories * no-mistakes(document): Clarify away next-command truncation handling --------- Co-authored-by: peterOC26 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
"when i am. talking to you via jobs in jobs thread it doesn't cancel away mode? decide what is the best way to handle this. and make the possible fix using grok and deepseek if needed"
Earlier report of the same gap (2026-11-03): "i tried to wake you up in Main tread by "hi firstamte" at 11/3/2026, 10:43:44 AM . you did not react at all. i had to wake you up here in ovis, why?" and, about jobs that carried a standing "finish this on your own" grant but sat held while away: "why you have to wait for me to wake you up?"
Context. The captain talks to firstmate either in the main conversation or through a private Jobs page whose notes reach this home's captain inbox (bin/fm-inbox.sh) and wake supervision as a check wake. While an away record exists on a home that runs the supervision host, every close goes to the headless away session (bin/fm-supervision-host.sh, "away (an away record exists): every close goes to the engine"). On 2026-11-03 a Jobs page note saying hello reached the inbox; the away session recorded "Away mode stays on, so the greeting is left unanswered" and kept main parked, so the captain got no answer until he typed into another tool. Only a message typed into the main conversation currently counts as the return.
Second gap, same round: the away session reads only the away words recorded at /afk. Jobs whose task note carried the captain's own standing autonomy grant (for example "you can finish this one on your own", or a project-wide "answer yourself when 80%+ sure") were held for the captain while he was away, losing about six hours.
Decision taken for the captain: any genuine captain message, whether typed in the main conversation or sent as a Jobs page / captain inbox note, ends away mode, because it proves he is reachable; he re-enters with /afk. In the same round, the away session honours a captain autonomy grant recorded in a job's own task note as standing authority for that job only, under the same gates as away words (never destructive, irreversible or security-sensitive; merges only where the grant names them).
What Changed
Risk Assessment
✅ Low: The away inbox hand-back reuses the existing inbox-key helpers and the attended main-only successor path, quiet mode and daemon homes are explicitly excluded, the arm-owner label suppression matches only the host's exact return line, and the prompt grant stays behind the same guarded scripts and gates; the only defect found is a cosmetic id list in the return line.
Testing
Seven real-product scenarios passed, alongside targeted notification regressions; the host regression’s timing race was reproduced, fixed, and rechecked. CLI transcripts and HTML evidence were captured; native UI screenshots were unavailable because interactive Claude stopped at workspace trust.
Evidence: Live validation transcripts
Source: Live validation transcripts
Evidence: Jobs message return and reply
Source: Jobs message return and reply
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-supervision-host.sh:1113- hand_back_away_inbox_note uses the note ids carried in the close's reason line only when no other unsurfaced note is queued ([ -n "$inbox_ids" ] || inbox_ids=$carried). Example: while away, the watcher closes withcheck: captain inbox note A, which marks A as surfaced. Before the host reads that close, note B is queued. collect_unsurfaced_inbox_note_ids then returns only B, so the hand-back printssupervision-host: the captain sent a note and away mode should end (captain inbox note B queued), and the log line also names only B, even though A is the note this close carries. Away mode still ends, and main's drain lists both notes, so the effect is a wrong id list in the line main is told to answer from. The two sets cannot overlap (carried ids are already surfaced, collected ids were not), so the fix is to join them:inbox_ids="$carried$INBOX_NOTE_IDS".✅ **Test** - passed
✅ No issues found.
bash tests/fm-supervision-host.test.sh— all preceding cases passed; the final boundary case exposed a timing race.bash tests/fm-claude-stop-autoarm.test.sh— passed.bash tests/fm-cursor-primary.test.sh— passed.Focusedtest_away_inbox_note_at_the_park_bound_is_the_returnruns: reproduced the race with a delayed note, replaced the wall-clock dependency with the existing test-clock interface, and passed normal and delayed runs.Real Claude interactive startup on an isolated 120×40 tmux session — stopped at workspace trust.Real Claude print-mode primary: entered away mode, parked the host, received an independently submittedfm-inbox.sh note, archived away mode, and persisted its reply.python3 ~/.no-mistakes/evidence/01M6NJ7527B7KV61XVM1960T4N/drive-live-lab.py boundarypython3 ~/.no-mistakes/evidence/01M6NJ7527B7KV61XVM1960T4N/drive-live-lab.py quietpython3 ~/.no-mistakes/evidence/01M6NJ7527B7KV61XVM1960T4N/drive-live-lab.py authority— real supervision engine, task mutations, refusals, and durable outcomes.python3 ~/.no-mistakes/evidence/01M6NJ7527B7KV61XVM1960T4N/verify-observations.py— verified captured product outputs and generated HTML evidence.Stopped private lab processes, removed disposable homes and transient runners, and confirmed only the intentional test fix remains.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
Follow-up
The away daemon and the Pi branch do not apply this hand-back yet.
Delivery through the native interactive adapters (omp, opencode, Claude stop autoarm, and Cursor turn-end) was not driven live.
Those edits are covered by tests/fm-claude-stop-autoarm.test.sh and tests/fm-cursor-primary.test.sh.