Repository navigation
fix: improve away-mode startup and work reporting - #43
Merged
Merged
Conversation
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.
…nding-work reporting
…, remove inferred relaunches
…ng away-session liveness
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.
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
Away words, 2026-11-05: "i will be away today, please try to do as much work as possible. go over our jobs board insects its shortcommings from history and try to correct it and use your new ideas and intuition to make it better. use deepseek and grok for that (they have and will have plenty of token allowance). move all jobs to next stages. answer questions when you are 80%+ confident. improve this afk command"
A history review of away mode found the recurring failures: jobs stalled because the away session did not start, did not see a job's next step, or no one noticed it was idle; read-backs that over- or under-stated what the away session would do; prose start promises that never fired; and a return brief that did not say what was left unstarted.
Build that follow-up list except standing away words, which waits for the captain's choice, and except the blocker-handling check. A later decision cut the blocker-handling check, the away-session liveness check, from this change entirely and left its redesign as separate follow-up work. A separate change already in review covers a Jobs page note ending away mode and per-job note grants; do not rebuild those. Evidence from the away day: a worker's blocker sat about five hours with no away handling and no hand-back. That liveness check is the item cut from this change.
Pin the gap where no away session starts after a clear followed by away. A live session lock under a new session id with a stale lock-session, plus an away record, must start the away host or record a durable alarm that the away session did not start. A clear in the same process must not leave the home unarmed. Attended arming stays as it is.
At away entry, print a read-only inventory after the away record is written. Live tasks, held rows, a queued row whose blocker is done, and a green pull request all appear in a stable order. Empty sections are omitted. An unreadable backlog prints the error and the command still exits 0. The inventory writes nothing.
When no away session is running, the main session records routine outcomes and does not send routine chat. A decision that belongs to the person away still becomes a held backlog task. This adds no new merge authority.
The return brief includes a Not started section. Each live next step appears once, with the exact next command. A task with an open blocked event has no line there. The section stays inside its byte budget.
The away read-back states what will actually happen: a green pull request plus the sentence that permits merging it, the slower advisory suite, a dropped sentence that was re-sent, and a stop after three failed checks. Merge gates stay as they are.
At entry, flag hold dates that have already passed and blockers that have cleared. Offer future dates. Register a future-date check only when explicitly asked. Already-due dates are named and not registered. Do not write seen-markers. The sweep is read-only on the backlog.
None of this changes the never-set or red-merge policy, local-only landing, merge gates, or the rule that away words are not parsed. Quiet mode stays as it is.
What Changed
/clearby refreshing stale session identifiers and allowing host-owned away supervision.Risk Assessment
✅ Low: The fix round is small and does what was prescribed. Next-command parsing now drops the line cut by the tasks-axi truncation marker and everything after it, so a cut command is never printed and complete earlier lines are still used. The Not started budget now counts bytes: in a subshell with LC_ALL=C, ${#var} returns the byte length. Its regressions exercise real tasks-axi truncation and a multibyte line, and both would fail against the previous code.
Testing
Four targeted regression files and eight direct CLI scenarios passed using disposable records and real executables. Product transcripts were captured; no graphical UI changed. Real Claude reached workspace trust, leaving three model-dependent scenarios untested. Labs were removed and no source changes remain.
Evidence: Direct CLI scenario transcript
Source: Direct CLI scenario transcript
Evidence: Real Claude launch blocked by workspace trust
Source: Real Claude launch blocked by workspace trust
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 2 issues found → auto-fixed ✅
bin/fm-afk-entry-brief.sh:358- ANext:command taken from a backlog body can come out cut off, and the return brief prints it as the exact next command.tasks-axi list(line 268) and the plaintasks-axi showused before 9f3dac7 both shorten a long body to about 500 characters and add\n... (truncated, N chars total ...).next_in_textthen reads the partial line as a real command. I reproduced it: a 480-character body followed byNext: bin/fm-send.sh job-a please continue the workmakesnot-startedprint- job-a: bin/fm-send.sh.s, with no error. A cut-offbin/fm-send.shcommand looks like a valid instruction, which goes against the intent's 'with the exact next command'. A long body with the Next line at the end loses the command or gets it partly cut. The same cut text shows up at:; next:in the entry inventory)Fix: when TASK_BODY contains the
... (truncated,marker, re-read that one row withfm_backlog_row_show "$DATA" "$id" --fullbefore taking the Next line. Rows that are not truncated keep the single list read. At minimum, never return a Next line that comes right before the truncation marker.bin/fm-afk-return.sh:719- The Not started budget counts characters, not bytes. The intent says 'The section stays inside its byte budget', butsize=${#extra_line}counts characters when the return runs in a UTF-8 locale. The header comment (line 33) also says 'characters'. A line with non-ASCII text, such as a bodyNext: bin/fm-send.sh job — continueor a non-ASCII backlog diagnostic, uses more bytes than it is charged for, so the section can go over FM_AFK_NOT_STARTED_BUDGET bytes. Fix: count withLC_ALL=C(for example a localLC_ALL=Caround the length read, orLC_ALL=C wc -c) and change the header comment to say bytes.🔧 Fix applied.
✅ Re-checked - no issues remain.
bin/fm-afk-entry-brief.sh:232- A healthy empty backlog produces a spurious error at entry and in the return's Not started section. Real tasks-axi successfully returnscount: 0without a task table, but the parser rejects it asbacklog list had no task table. Adding one ordinary task removes the diagnostic without changing configuration. Accept the successful zero-task response as empty, preserve genuine read errors, and add an executable empty-backlog regression. Reproduction: entry-boundaries.txt.bash tests/fm-afk-entry-brief.test.shbash tests/fm-afk-return.test.shbash tests/fm-afk-main-outcome.test.shbash tests/fm-claude-stop-autoarm.test.shpython3 ~/.no-mistakes/evidence/01M6Q1S6BCZ3DT0QKMCSE7DG31/live-scenarios.pypython3 ~/.no-mistakes/evidence/01M6Q1S6BCZ3DT0QKMCSE7DG31/live-entry-boundaries.pyLaunched the real Claude CLI in a disposable marked lab using private tmux sessionprimarywith a 120×40 grid; captured workspace trust and stopped the private server.git status --shortconfirmed no worktree changes; disposable labs were removed.🔧 Fix applied.
1 warning still open:
TMPDIR="$PWD/.test-tmp" bash tests/fm-afk-entry-brief.test.shTMPDIR="$PWD/.test-tmp" bash tests/fm-afk-return.test.shTMPDIR="$PWD/.test-tmp" bash tests/fm-afk-main-outcome.test.shTMPDIR="$PWD/.test-tmp" bash tests/fm-claude-stop-autoarm.test.shpython3 ~/.no-mistakes/evidence/01M6Q1S6BCZ3DT0QKMCSE7DG31/drive-cli.pypython3 ~/.no-mistakes/evidence/01M6Q1S6BCZ3DT0QKMCSE7DG31/drive-claude.py— private tmux server with a 120×40 terminalRemoved disposable labs and temporary test files; confirmed a clean working tree.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
Open live checks
These three checks still need a real attended session. They are not a defect in this change.