Repository navigation
feat: advance completed work during away mode - #79
Merged
Merged
Conversation
…rompt execution path and update tests accordingly for accuracy and clarity in instructions to avoid confusion or delays due to undefined guard references
…`. Fixed the at-turn hand-back test’s timing race by waiting up to 15 seconds for the existing hand-off owner to publish its replacement watcher; five isolated runs passed. Resolved the prompt-test conflict to match the base’s emitted contract while preserving the PR’s away-authority assertions; `tests/fm-branch-supervision.test.sh` passed. The full host-hook suite also passed before the timing adjustment, and `git diff --check` passed. “Full suite” was the roll-up of the failed behavior lane
…ke to reach the handled ledger
…ir review phase uncertain
This was referenced Nov 21, 2026
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
During a 6-hour /afk on 2026-11-21, three jobs sat until the captain returned: a plan ready for its second-model check, a green PR needing its next code stage, and an ask-user finding firstmate could have decided under ask-user-authority. The away helper held them because the Away posture rules in bin/fm-branch-prompt.sh let it act only on the away words or a task-note grant, and moving a staged job to its next stage is MAIN's job. The captain asked why the work was not done before his return. Options offered: A = let the away helper move a job to the next stage its instructions already set, and answer review questions the standing rules let firstmate answer (merges, destructive actions and captain decisions still wait); B = keep the rule and add 'keep jobs moving' to the away words. Captain (Q2315): "yes, do that" = A.
What Changed
Risk Assessment
✅ Low: The change is limited to the prompt, the docs and the return-brief rendering. It matches the captain's choice A, and the existing guard scripts (relaunch refusals, the resolve-key relocation, the merge and never-set gates) are unchanged. Round 1's fixes check out against the current code; the only gaps left are documentation drift and test pinning.
Testing
Ran the focused shell checks and drove the real send, prompt-generation, and return scripts against synthetic lab data. The attended refusal, away answer, generated prompt, and return brief are captured. A valid supervisor-engine wake and real stage relaunch remain untested because the available safe primary paths were blocked by gate scope and Claude's user-config trust boundary. Disposable labs and private tmux servers were removed. No screenshot applies to this generated-text and CLI surface.
codex exec --ephemeralturn with synthetic records;fm-wake-drain.shexited before acting because the host-published.branch-eligible-rowssnapshot was missing. A real primary in th…fm-controlEvidence: Away branch send and return brief
Source: Away branch send and return brief
Evidence: Generated supervision-host prompt
Source: Generated supervision-host prompt
Evidence: Disposable primary trust prompt
Source: Disposable primary trust prompt
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-branch-prompt.sh:178- The new away actions that need no grant (relaunching a job into its next declared stage at line 178, and answering an ask-user finding under ask-user-authority at line 179) have no logging rule. Line 191 requires the "per your away instructions:" marker only for actions taken under the words, and line 199 requires it only for task-note grants. The return brief's account (bin/fm-afk-return.sh:588, AWAY_ACTION_MARKER) lists only rows that carry that marker. Unmarked rows fall into the routine rollup, which prints only the latest five visible outcomes (bin/fm-afk-return.sh:836-837). Concrete case: during a 6-hour /afk the branch relaunches three jobs and answers two ask-user findings, then records ten later routine outcomes. On return, the captain's brief names none of the five actions; it only counts them. Before this change, the policy answer sat in the list of actions under the words (old line 184), so the marker rule arguably covered it. Remedy needs a decision: either extend the line-191 logging rule to the two actions that need no grant (the wording "per your away instructions:" would then be inaccurate for them), or add a second marker that bin/fm-afk-return.sh also renders. Both change the return-brief contract, so ask before choosing..agents/skills/afk/SKILL.md:29- The intent only requires adding standing authority for stage advance and policy-authorized ask-user answers. That makes "the words are the whole mandate" inaccurate, but the change also removes the separate prohibition the docs recorded as the captain's own mandate. The old text said "by the captain's mandate no parser, tokenizer, classifier, or grammar reads them anywhere". The new text says only "no script parses the words" (.agents/skills/afk/SKILL.md:29) and "stores the captain's words verbatim, and does not parse them" (docs/architecture.md:219). The new wording no longer excludes a classifier, tokenizer, or grammar that is not a script, and it drops the attribution to the captain. No intent requirement needs this. Recommended remedy: restore the original prohibition sentence in both files and remove only the "whole mandate" clause.tests/fm-afk-contract.test.sh:3- The test header still describes the record as "the captain's away words recorded verbatim as the whole mandate". This branch removed that claim from bin/fm-afk-contract.sh (header and the retired-flag message at line 595), from the afk skill, and from the docs, so the comment is now stale. Reword it to "recorded verbatim as free text".🔧 Fix applied.
2 infos still open:
docs/pi-supervision-branch.md:620- Round 1's fix added the second outcome marker "on standing away authority:" in two places: the branch prompt (bin/fm-branch-prompt.sh:180) and the return script's matcher (bin/fm-afk-return.sh:589, 619-620). It left the descriptions of the audit trail behind. These still name only "per your away instructions:" as the way the return brief accounts for away actions: docs/pi-supervision-branch.md:620 and the audit-trail lines at 634-635; .agents/skills/afk/SKILL.md:67 (the While-away bullet, which also says nothing of the two standing actions); and the comment above the markers at bin/fm-afk-return.sh:585-587, which describes one marker while two constants sit under it. Mention the standing-authority marker beside the existing one at each of these sites.tests/fm-branch-supervision.test.sh:150- The return brief lists a standing action only if its summary opens with exactly "on standing away authority:" (bin/fm-afk-return.sh:589). The model writes that prefix only because the emitted prompt tells it to (bin/fm-branch-prompt.sh:180). The new emitted-prompt assertions check the relaunch and resolve-key lines but not this logging line. If the prompt wording or marker changes, the return brief silently drops the rows again, which is the round-1 defect, and no test fails. The emitted prompt is an intentional generated interface and the return script's marker is an independent oracle. Add an assertion on the away section that the emitted prompt tells the model to open summaries with the same marker the return script matches. That assertion would reject a renamed or missing marker.fm-claude-trust.shwrite.claude.jsonto the selected Claude config, outside this run's workspace boundary. A disposable authenticated Claude config inside the workspace would enable a safe live rerun.fm-controlcodex exec --ephemeralturn with synthetic records;fm-wake-drain.shexited before acting because the host-published.branch-eligible-rowssnapshot was missing. A real primary in th…fm-controlbash tests/fm-branch-supervision.test.shbash tests/fm-afk-return.test.shbash tests/fm-control-relaunch.test.shAttended and awayFM_SUPERVISION_ACTOR=branch bin/fm-send.sh policy-safe --resolve-key scope-correction 'Fix: align with the accepted contract.'against the disposable labFM_HOME="$LAB/home" bin/fm-afk-return.sh beginFM_HOME="$LAB/home" bin/fm-branch-prompt.sh --supervision-hostcodex exec --ephemeral --cd "$PWD" --sandbox workspace-write --json -with synthetic wake input; drain refused the missing eligible-row snapshotStarted and stopped real Claude CLI primaries through privatefm-labtmux sockets; inspected the disposable workspace-trust prompt and stopped without approving it✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.