Repository navigation
fix(bin): restore Claude slash-command submission on Herdr - #6695
Conversation
…pup row Claude Code 2.1.291 draws the selected row of its slash-command popup with the same `❯` marker as its composer, so that row below the composer's closing rule became the bottom-most bare composer candidate and the whole popup list was read as the typed command. The Herdr Claude payload proof then judged the payload unsent, cleared it, and reported send-failed, so `fm-control exit` and every slash command sent through `fm-send` failed on Herdr. Demote that row to the proven envelope above it, but only when the envelope's own glyph row holds typed `/` text (the fallback read can never be empty) and the row has the popup shape: a leading `/` or a truncated `…` name, then a gap of two or more spaces before its description. Numbered-choice dialog rows, one-word drafts, empty composers, and typed prose keep their old reading, and the head-truncation and placeholder-remainder refusals are unchanged. Regression tests run against real captures of the 2.1.291 screens. The live guard gains a /context scenario, and the dated verification record is updated.
|
…live test and the verification doc changed; product code and box handling are untouched. The changes are left uncommitted for the outer executor. **ci-2** (tests/fm-herdr-submit-confirm-live-e2e.test.sh) - Invariant: a live delivery check must show that the command actually ran, through its rendered output. An empty composer and a registered agent are not enough. - Fix: after the `/context` verdict, the test now polls the pane the same way the earlier reply check does, until `/context`'s `Context Usage` heading renders. Any other result fails. - I confirmed that heading with a probe in an isolated `fm-lab-` session. The popup's description says "context usage" in lowercase, so the case-sensitive match cannot hit the popup. - The read window is 1000 lines (`--source recent --lines 1000`). The report runs to hundreds of rows here with its heading at the top, so the 200-line window the reply check uses would lose it. - The existing agent-registered and composer-empty checks are kept. The header comment, block comment and pass message were updated to match. **ci-3** (docs/verification/runtime-backends.md) - Invariant: only tests that fail against the previous classifier may be called before-and-after regressions. - I ran each of the five tests on its own against base 5838f10's `bin/fm-composer-lib.sh`: - These 3 fail there and are now labelled before-and-after regressions: `marked_row_is_not_a_second_composer`, `composer_content_..._not_the_composer`, and `send_text_submit_..._proven_and_submitted` (the last one returned 'unknown'). - These 2 pass there and are now labelled guards: `demotion_only_ever_refuses` and `popup_still_refuses_a_partial_payload`. - I corrected one more claim in the same paragraph. It said the live guard fails against the old classifier "at the `/exit` scenario". A live run against the old classifier (session `fm-lab-herdr-submit-con-1106578-15406`) actually fails earlier, at `/context`, with `send-failed`. The doc now says that. - The doc's recorded live output was replaced with the real output of the new run. **Verification** - Live guard on HEAD: `FM_HERDR_SUBMIT_CONFIRM_LIVE=1 ANTHROPIC_MODEL=claude-haiku-4-5-20251001` passed all 4 checks, including "...proves and submits a typed /context behind its command popup and renders its report". It ran in its own session, `fm-lab-herdr-submit-con-1098793-23839`. - Every live run used only its own `fm-lab-` session. Afterwards `herdr session list` shows only `default`, which was never touched. - `tests/fm-composer-lib.test.sh` returned 0 with 47 ok, and `tests/fm-backend-herdr.test.sh` returned 0 with 233 ok. - With the opt-in off, the live test skips with rc 0. - `bin/fm-lint.sh` returned 0 (ShellCheck 0.11.0, actionlint 1.7.12). - Temporary directories were removed. **Gap:** the new check's failure path was never triggered in a live run, because the old classifier fails earlier, at the verdict. That the check can tell a run from no run rests on the probe: the heading is not on screen before submission, and the popup text is lowercase
Re-verified on Claude Code 2.1.296 (2026-10-10)The bug still reproduces on Claude Code 2.1.296, the newest release (npm Herdr 0.8.2, real Claude Code 2.1.296 (Haiku 4.5) in an isolated lab session, typing
tmux 3.7c, private server, same Claude version: Related: #6813 reports the same Herdr failure on 2.1.292 and proposes a separate fix, so one of the two can land and the other can be closed. |
|
Following the triage on #6759 that points at this PR: the |
|
Speaking as Kun's firstmate: thank you @AokDesu, and thanks for the 2.1.296 re-verification. Sorry the runs sat waiting. I reviewed the diff ( My verdict:
One note: #6813 fixes the same Herdr popup failure. Only one of the two will land, and the other will be closed with thanks. Status: waiting on CI — nothing is needed from you right now. If CI and no-mistakes come back green and it stays clean, this is eligible to merge. |
|
Thanks for approving the runs on Oct 11. Neither has started since: It does not look specific to this PR. Right now the repository has 23 queued runs, from 7 forks (AgardnerAU, AokDesu, HotThoughts, iamjaredwalters, leonardourci, maruthiprithivi, nchandar). All 23 were approved days after they were created, and none has a job ( If re-running these two workflows from the Actions tab does not start them, I can rebase this branch onto current main so a fresh pair of runs is created. It is 30 commits behind but still merges cleanly. That would move the head away from the |
…d above Claude's glyph-marked popup row (#81) * fix(bin): read a typed slash command above Claude 2.1.291's marked popup row Claude Code 2.1.291 draws the selected row of its slash-command popup with the same `❯` marker as its composer, so that row below the composer's closing rule became the bottom-most bare composer candidate and the whole popup list was read as the typed command. The Herdr Claude payload proof then judged the payload unsent, cleared it, and reported send-failed, so `fm-control exit` and every slash command sent through `fm-send` failed on Herdr. Demote that row to the proven envelope above it, but only when the envelope's own glyph row holds typed `/` text (the fallback read can never be empty) and the row has the popup shape: a leading `/` or a truncated `…` name, then a gap of two or more spaces before its description. Numbered-choice dialog rows, one-word drafts, empty composers, and typed prose keep their old reading, and the head-truncation and placeholder-remainder refusals are unchanged. Regression tests run against real captures of the 2.1.291 screens. The live guard gains a /context scenario, and the dated verification record is updated. * no-mistakes(review): Ghost-strip popup demotion guard; relocate 2.1.291 docs * no-mistakes(review): Match popup guard to fallback's plain glyph row * no-mistakes(review): Narrow box popup test; note box follow-up in docs * no-mistakes(document): Point same-glyph footer rule at 2.1.291 popup exception * no-mistakes(ci): Both selected Greptile findings are fixed. Only the live test and the verification doc changed; product code and box handling are untouched. The changes are left uncommitted for the outer executor. **ci-2** (tests/fm-herdr-submit-confirm-live-e2e.test.sh) - Invariant: a live delivery check must show that the command actually ran, through its rendered output. An empty composer and a registered agent are not enough. - Fix: after the `/context` verdict, the test now polls the pane the same way the earlier reply check does, until `/context`'s `Context Usage` heading renders. Any other result fails. - I confirmed that heading with a probe in an isolated `fm-lab-` session. The popup's description says "context usage" in lowercase, so the case-sensitive match cannot hit the popup. - The read window is 1000 lines (`--source recent --lines 1000`). The report runs to hundreds of rows here with its heading at the top, so the 200-line window the reply check uses would lose it. - The existing agent-registered and composer-empty checks are kept. The header comment, block comment and pass message were updated to match. **ci-3** (docs/verification/runtime-backends.md) - Invariant: only tests that fail against the previous classifier may be called before-and-after regressions. - I ran each of the five tests on its own against base 5838f10's `bin/fm-composer-lib.sh`: - These 3 fail there and are now labelled before-and-after regressions: `marked_row_is_not_a_second_composer`, `composer_content_..._not_the_composer`, and `send_text_submit_..._proven_and_submitted` (the last one returned 'unknown'). - These 2 pass there and are now labelled guards: `demotion_only_ever_refuses` and `popup_still_refuses_a_partial_payload`. - I corrected one more claim in the same paragraph. It said the live guard fails against the old classifier "at the `/exit` scenario". A live run against the old classifier (session `fm-lab-herdr-submit-con-1106578-15406`) actually fails earlier, at `/context`, with `send-failed`. The doc now says that. - The doc's recorded live output was replaced with the real output of the new run. **Verification** - Live guard on HEAD: `FM_HERDR_SUBMIT_CONFIRM_LIVE=1 ANTHROPIC_MODEL=claude-haiku-4-5-20251001` passed all 4 checks, including "...proves and submits a typed /context behind its command popup and renders its report". It ran in its own session, `fm-lab-herdr-submit-con-1098793-23839`. - Every live run used only its own `fm-lab-` session. Afterwards `herdr session list` shows only `default`, which was never touched. - `tests/fm-composer-lib.test.sh` returned 0 with 47 ok, and `tests/fm-backend-herdr.test.sh` returned 0 with 233 ok. - With the opt-in off, the live test skips with rc 0. - `bin/fm-lint.sh` returned 0 (ShellCheck 0.11.0, actionlint 1.7.12). - Temporary directories were removed. **Gap:** the new check's failure path was never triggered in a live run, because the old classifier fails earlier, at the verdict. That the check can tell a run from no run rests on the probe: the heading is not on screen before submission, and the popup text is lowercase --------- Co-authored-by: Aok <[email protected]>
…d above Claude's glyph-marked popup row (#81) * fix(bin): read a typed slash command above Claude 2.1.291's marked popup row Claude Code 2.1.291 draws the selected row of its slash-command popup with the same `❯` marker as its composer, so that row below the composer's closing rule became the bottom-most bare composer candidate and the whole popup list was read as the typed command. The Herdr Claude payload proof then judged the payload unsent, cleared it, and reported send-failed, so `fm-control exit` and every slash command sent through `fm-send` failed on Herdr. Demote that row to the proven envelope above it, but only when the envelope's own glyph row holds typed `/` text (the fallback read can never be empty) and the row has the popup shape: a leading `/` or a truncated `…` name, then a gap of two or more spaces before its description. Numbered-choice dialog rows, one-word drafts, empty composers, and typed prose keep their old reading, and the head-truncation and placeholder-remainder refusals are unchanged. Regression tests run against real captures of the 2.1.291 screens. The live guard gains a /context scenario, and the dated verification record is updated. * no-mistakes(review): Ghost-strip popup demotion guard; relocate 2.1.291 docs * no-mistakes(review): Match popup guard to fallback's plain glyph row * no-mistakes(review): Narrow box popup test; note box follow-up in docs * no-mistakes(document): Point same-glyph footer rule at 2.1.291 popup exception * no-mistakes(ci): Both selected Greptile findings are fixed. Only the live test and the verification doc changed; product code and box handling are untouched. The changes are left uncommitted for the outer executor. **ci-2** (tests/fm-herdr-submit-confirm-live-e2e.test.sh) - Invariant: a live delivery check must show that the command actually ran, through its rendered output. An empty composer and a registered agent are not enough. - Fix: after the `/context` verdict, the test now polls the pane the same way the earlier reply check does, until `/context`'s `Context Usage` heading renders. Any other result fails. - I confirmed that heading with a probe in an isolated `fm-lab-` session. The popup's description says "context usage" in lowercase, so the case-sensitive match cannot hit the popup. - The read window is 1000 lines (`--source recent --lines 1000`). The report runs to hundreds of rows here with its heading at the top, so the 200-line window the reply check uses would lose it. - The existing agent-registered and composer-empty checks are kept. The header comment, block comment and pass message were updated to match. **ci-3** (docs/verification/runtime-backends.md) - Invariant: only tests that fail against the previous classifier may be called before-and-after regressions. - I ran each of the five tests on its own against base 5838f10's `bin/fm-composer-lib.sh`: - These 3 fail there and are now labelled before-and-after regressions: `marked_row_is_not_a_second_composer`, `composer_content_..._not_the_composer`, and `send_text_submit_..._proven_and_submitted` (the last one returned 'unknown'). - These 2 pass there and are now labelled guards: `demotion_only_ever_refuses` and `popup_still_refuses_a_partial_payload`. - I corrected one more claim in the same paragraph. It said the live guard fails against the old classifier "at the `/exit` scenario". A live run against the old classifier (session `fm-lab-herdr-submit-con-1106578-15406`) actually fails earlier, at `/context`, with `send-failed`. The doc now says that. - The doc's recorded live output was replaced with the real output of the new run. **Verification** - Live guard on HEAD: `FM_HERDR_SUBMIT_CONFIRM_LIVE=1 ANTHROPIC_MODEL=claude-haiku-4-5-20251001` passed all 4 checks, including "...proves and submits a typed /context behind its command popup and renders its report". It ran in its own session, `fm-lab-herdr-submit-con-1098793-23839`. - Every live run used only its own `fm-lab-` session. Afterwards `herdr session list` shows only `default`, which was never touched. - `tests/fm-composer-lib.test.sh` returned 0 with 47 ok, and `tests/fm-backend-herdr.test.sh` returned 0 with 233 ok. - With the opt-in off, the live test skips with rc 0. - `bin/fm-lint.sh` returned 0 (ShellCheck 0.11.0, actionlint 1.7.12). - Temporary directories were removed. **Gap:** the new check's failure path was never triggered in a live run, because the old classifier fails earlier, at the verdict. That the check can tell a run from no run rests on the probe: the heading is not on screen before submission, and the popup text is lowercase --------- Co-authored-by: Aok <[email protected]>
…d above Claude's glyph-marked popup row (#81) * fix(bin): read a typed slash command above Claude 2.1.291's marked popup row Claude Code 2.1.291 draws the selected row of its slash-command popup with the same `❯` marker as its composer, so that row below the composer's closing rule became the bottom-most bare composer candidate and the whole popup list was read as the typed command. The Herdr Claude payload proof then judged the payload unsent, cleared it, and reported send-failed, so `fm-control exit` and every slash command sent through `fm-send` failed on Herdr. Demote that row to the proven envelope above it, but only when the envelope's own glyph row holds typed `/` text (the fallback read can never be empty) and the row has the popup shape: a leading `/` or a truncated `…` name, then a gap of two or more spaces before its description. Numbered-choice dialog rows, one-word drafts, empty composers, and typed prose keep their old reading, and the head-truncation and placeholder-remainder refusals are unchanged. Regression tests run against real captures of the 2.1.291 screens. The live guard gains a /context scenario, and the dated verification record is updated. * no-mistakes(review): Ghost-strip popup demotion guard; relocate 2.1.291 docs * no-mistakes(review): Match popup guard to fallback's plain glyph row * no-mistakes(review): Narrow box popup test; note box follow-up in docs * no-mistakes(document): Point same-glyph footer rule at 2.1.291 popup exception * no-mistakes(ci): Both selected Greptile findings are fixed. Only the live test and the verification doc changed; product code and box handling are untouched. The changes are left uncommitted for the outer executor. **ci-2** (tests/fm-herdr-submit-confirm-live-e2e.test.sh) - Invariant: a live delivery check must show that the command actually ran, through its rendered output. An empty composer and a registered agent are not enough. - Fix: after the `/context` verdict, the test now polls the pane the same way the earlier reply check does, until `/context`'s `Context Usage` heading renders. Any other result fails. - I confirmed that heading with a probe in an isolated `fm-lab-` session. The popup's description says "context usage" in lowercase, so the case-sensitive match cannot hit the popup. - The read window is 1000 lines (`--source recent --lines 1000`). The report runs to hundreds of rows here with its heading at the top, so the 200-line window the reply check uses would lose it. - The existing agent-registered and composer-empty checks are kept. The header comment, block comment and pass message were updated to match. **ci-3** (docs/verification/runtime-backends.md) - Invariant: only tests that fail against the previous classifier may be called before-and-after regressions. - I ran each of the five tests on its own against base 5838f10's `bin/fm-composer-lib.sh`: - These 3 fail there and are now labelled before-and-after regressions: `marked_row_is_not_a_second_composer`, `composer_content_..._not_the_composer`, and `send_text_submit_..._proven_and_submitted` (the last one returned 'unknown'). - These 2 pass there and are now labelled guards: `demotion_only_ever_refuses` and `popup_still_refuses_a_partial_payload`. - I corrected one more claim in the same paragraph. It said the live guard fails against the old classifier "at the `/exit` scenario". A live run against the old classifier (session `fm-lab-herdr-submit-con-1106578-15406`) actually fails earlier, at `/context`, with `send-failed`. The doc now says that. - The doc's recorded live output was replaced with the real output of the new run. **Verification** - Live guard on HEAD: `FM_HERDR_SUBMIT_CONFIRM_LIVE=1 ANTHROPIC_MODEL=claude-haiku-4-5-20251001` passed all 4 checks, including "...proves and submits a typed /context behind its command popup and renders its report". It ran in its own session, `fm-lab-herdr-submit-con-1098793-23839`. - Every live run used only its own `fm-lab-` session. Afterwards `herdr session list` shows only `default`, which was never touched. - `tests/fm-composer-lib.test.sh` returned 0 with 47 ok, and `tests/fm-backend-herdr.test.sh` returned 0 with 233 ok. - With the opt-in off, the live test skips with rc 0. - `bin/fm-lint.sh` returned 0 (ShellCheck 0.11.0, actionlint 1.7.12). - Temporary directories were removed. **Gap:** the new check's failure path was never triggered in a live run, because the old classifier fails earlier, at the verdict. That the check can tell a run from no run rests on the probe: the heading is not on screen before submission, and the popup text is lowercase --------- Co-authored-by: Aok <[email protected]>
|
Independent confirmation from a user/operator home: this fixes the idle-worker What I saw before the change: Checked against two real 2.1.304 captures with
So #6695 also covers the shape where a notice row sits between the rule and the popup, which #7388 does not. With this PR applied unchanged on main
Would love to see this merged so we can stay on stock firstmate. |
|
Independent check on Claude Code 2.1.309 (newer than the 2.1.304 already confirmed here), on a remote Herdr host that uses Claude's default inline renderer. What the failure looked like. Why it only shows on some setups. With the inline renderer (the default), the slash menu is drawn below the composer, and its selected row starts with the same Check against the open PR heads. I ran
So on 2.1.309's inline layout all three heads read the composer correctly; only main fails. This is the shared reader on a reproduced screen, not a live Suggestion for whichever PR lands: the existing popup fixture draws the first menu row without the |
Intent
Refresh the open upstream pull request #6695 so it can merge: "can we go refresh the PRs for him? #6695", and "you can use grok to refresh the PR". The validation runs on ChatGPT Sol high for this run only, and the other open pull request, #7344, is left as it is.
What the maintainer asked (Kun's firstmate, 2026-10-25, #6695 (comment)): its verdict on the fix is unchanged (contract-class restore, it covers the most popup shapes, three independent field confirmations); the approved CI and no-mistakes runs from Oct 6 never got a runner and will not start, so bring the branch up to date with main and re-push through no-mistakes, giving a fresh head plus its attestation. Once green and attested it is eligible to merge, and the overlapping #7388 and #6813 would close.
The fix itself, as originally asked: "Before you fix the firstmate bug you can do updatefirstmate command first then if there is still a bug you can go fix it right away."
The bug, as it was reported (first seen on 2026-10-06 with Claude Code 2.1.291): firstmate cannot type a command that starts with
/into a Claude worker running on the Herdr backend. While the command is typed, Claude shows its slash-command suggestion list under the input box; firstmate's safety check reads that list as leftover typed text and backs out without submitting. So stopping or restarting a worker (bin/fm-control.sh <id> exit|relaunch, which fails with "the exit command could not be sent to task on herdr") and starting validation by sending/no-mistakesthroughbin/fm-send.shboth fail."Does it already fixed yet? If it already fixed we should close the PR. Re-test the bug on this version please maybe it fixed." (Re-tested 2026-10-10 on Claude Code 2.1.296: still broken on main and fixed by the PR; later field reports confirm the same on 2.1.304 and 2.1.309.)
"1 more thing I want you to make sure that does it becuase I ran claude code on herdr that make you can't do exit command." (The failure is specific to Herdr; tmux is unaffected.)
What Changed
/contextdelivery checks and document the popup detection rules, verification results, and limitations.Risk Assessment
Testing
Targeted composer and Herdr suites passed, including historical popup and refusal guards. Live Claude 2.1.310 checks on Herdr 0.9.1 and tmux passed after correcting disposable fixture setup. Terminal captures, HTML, screenshot, and command transcripts were retained; the worktree is clean. /no-mistakes was inspected without executing another pipeline.
Evidence: Popup, context report, and exit evidence
Source: Popup, context report, and exit evidence
Evidence: Herdr user commands and overwrite refusal
Source: Herdr user commands and overwrite refusal
Evidence: Tmux submission and exit
Source: Tmux submission and exit
Evidence: Base versus target on this run’s live popup capture
Source: Base versus target on this run’s live popup capture
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-composer-lib.sh:1844- Named Claude sessions retain the original submission failure. The supportedclaude -n Andrewshape has a titled top rule, which_fm_composer_scan_screendoes not record as a separator. With no earlier proven envelope in the viewport,FM_COMPOSER_FOOTER_GLYPHremains -1, so this guard rejects the demotion. For a titled rule followed by❯ /exit, a solid closing rule, and❯ /exit Exit the CLI, extraction still returns the popup description; Herdr's payload proof clears the command without submitting it. Named-session behavior is documented at docs/verification/runtime-backends.md:959 and exercised at tests/fm-composer-lib.test.sh:192. Reuse the existing titled-rule proof when establishing the popup's composer boundary, preserving the approved box exclusion. The same invariant must hold at bin/fm-composer-lib.sh:1905 (selection), bin/fm-composer-lib.sh:2010 (extraction), and bin/fm-composer-lib.sh:2253 (classification).✅ **Test** - passed
✅ No issues found.
TMPDIR="$PWD/.test-slash-popup/tmp" bin/fm-test-run.sh tests/fm-composer-lib.test.sh tests/fm-backend-herdr.test.shFM_HERDR_SUBMIT_CONFIRM_LIVE=1 bin/fm-test-run.sh tests/fm-herdr-submit-confirm-live-e2e.test.sh, with a marked disposable FM_HOME and session-scoped evidence wrapper.Ran the retainedmanual-live.shdriver against isolated Herdr labs to check popup reads, overwrite refusal, fm-send, and fm-control.Ran the retainedtmux-live.shdriver against a private, sized tmux session using a shell-backed Claude worker.Compared base and target classifier outputs against this run’s captured /exit popup: base included popup descriptions; target returned only /exit.Rendered actual terminal captures as HTML, captured and inspectedterminal-evidence.png, stopped the browser, tore down the labs and private tmux servers, and removed disposable worktree fixtures.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.