fix(bin): detect Grok 4.5 busy workers correctly - #5
Merged
Conversation
Grok Build 0.2.118 / Grok 4.5 shows Esc:cancel mid-turn instead of Ctrl+c:cancel, so busy detection missed every live turn and idle alarms could fire on healthy workers. Match both verified cancel-footer forms as an alternation, correct the Escape interrupt fact, and cover busy/idle for each form in the existing busy-state tests.
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
Fix firstmate's stall detection for Grok 4.5 workers so firstmate can tell a stuck Grok 4.5 worker from a healthy one (both false negatives and false positives).
Confirmed live bug: harness-adapters and busy detection recorded busy as ASCII
Ctrl+c:cancelin the keybind footer, but Grok 4.5 / Build 0.2.118 rendersEsc:cancelinstead (e.g.Shift+Tab:mode | Esc:cancel | Ctrl+x:shortcutsmid-turn; idle has no:canceltoken). That made busy/idle classification wrong for every Grok 4.5 worker. Also recorded that interrupt is only Ctrl+C and that Esc only moves focus to scrollback and does NOT interrupt - false on 4.5; Escape DOES cancel the running turn (also verified Ctrl+C still cancels mid-turn).Requirements:
Ctrl+c:cancelfooter and 4.5'sEsc:cancel, so a mixed fleet keeps working; do not simply swap one literal for another.Acceptance (executable tests where code allows):
What Changed
Ctrl+c:canceland Grok 4.5Esc:cancelfooters across tmux and Grok-specific busy detection while keeping idle footers classified correctly.Risk Assessment
✅ Low: Captain, the change is narrowly scoped and consistently updates both Grok detection paths, preserves the older footer, correctly documents interruption, and adds busy/idle coverage without a source-verifiable regression.
Testing
No baseline test output was supplied. After correcting an evidence-command shell mismatch by rerunning under Bash, all targeted regression tests, direct captured-footer classification checks, documentation audit, scope audit, and final cleanliness check passed. This is CLI detection and documentation behavior, so screenshot evidence was not applicable.
Evidence: Grok busy/idle classification transcript
Older footer: busy grok-regex Grok 4.5 footer: busy grok-regex Grok 4.5 idle footer: idle grok-regex Obsolete interrupt claims: 0Pipeline
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.
bash tests/fm-busy-state.test.shbash tests/fm-busy-adapter-wiring.test.shbash tests/fm-crew-state.test.shbash tests/fm-tmux-submit-busy.test.shUnder/bin/bash, sourcedbin/fm-busy-lib.shandbin/fm-tmux-lib.shand classified older busy, Grok 4.5 busy, and Grok 4.5 idle captures through both consumersrg -n 'FM_TMUX_GROK_BUSY_REGEX_DEFAULT|fm_busy_grok_tail_busy|fm_pane_is_busy' bin/fm-tmux-lib.sh bin/fm-busy-lib.shSearched tracked source forEsc.*only moves focus|does NOT interruptand found no matchesgit status --short --untracked-files=all✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.