Skip to content

fix(backends): restore Claude exit delivery on tall Herdr panes - #5680

Closed
d1on wants to merge 2 commits into
kunchenguid:mainfrom
d1on:fm/fm-remote-secondmate-exit-herdr-2-20260925
Closed

d1on wants to merge 2 commits into
kunchenguid:mainfrom
d1on:fm/fm-remote-secondmate-exit-herdr-2-20260925

Conversation

@d1on

@d1on d1on commented Sep 25, 2026

Copy link
Copy Markdown

Intent

Follow-up to data/fm-remote-secondmate-exit-herdr-20260925/report.md (read it first). That scout found bluefin Claude vim editor mode breaks the exit path. On 2026-09-25 ~14:55 local the captain approved turning vim off: bluefin ~/.claude/settings.json and ~/.claude.json now have editorMode "normal" (backups *.bak-20260925-vim). Lighthouse's footer no longer shows -- INSERT -- (live reload), it reported 'nothing in flight, going idle', yet FM_HOME=~/firstmate bin/fm-on.sh lighthouse fm-remote-secondmate-control.sh relaunch lighthouse claude claude-opus-5-5 medium STILL fails with 'the exit command could not be sent to task lighthouse on herdr' (three more attempts ~13:50-14:05Z UTC). This matches the first report's 'unresolved uncertainty' (idle lighthouse attempts failing). Find the real remaining cause and a safe way to restart lighthouse and bluefin now.

Substance of the referenced report (data/fm-remote-secondmate-exit-herdr-20260925/report.md): restarting the two remote second mates on bluefin, lighthouse and bluefin, which are Claude Code agents running on the Herdr backend, fails at the exit step with "the exit command could not be sent to task on herdr", after which the relaunch rolls back and leaves the old agent running. That report found that in Claude's vim editor mode the exit path's interrupt key, Escape, only switches the composer to vim NORMAL mode, so the typed /exit command is garbled and the Herdr submit core's Claude-only payload proof, which reads the composer back before pressing Enter, refuses it. Its unresolved uncertainty: three lighthouse attempts also failed while the mate had been idle for 30 seconds or more, and no Escape is sent to an idle agent; the report could not reproduce or explain those idle failures.

What Changed

  • When Claude’s slash-command menu hides the composer from Herdr’s short read, retry payload proof at the pane’s visible height before submitting /exit.
  • Add fixture and opt-in live coverage for idle and busy Claude exits, plus documentation of the failure mode and guarded relaunch procedure.

Risk Assessment

✅ Low: The viewport fallback is confined to failed Claude payload proofs and preserves refusal when the composer cannot be verified.

Testing

Targeted backend tests passed. The live lab reproduced the short-read blind spot, then confirmed idle and busy Claude exits through the control plane. The first live attempt stopped at a Claude trust prompt; after a test-fixture fix, the retry passed. The live transcript is saved as evidence. Production mates were not touched, and the referenced report was unavailable in this worktree.

  • Live validation: ✅ go - 2 of 3 scenarios driven live against the product
Scenario Result Live Evidence
Exit an idle Claude second mate after its slash menu hides the composer from a short Herdr read ✅ pass live claude-slash-menu-live-final.log: the 20-row read missed /exit, the widened read found it, and fm-control exit reported stopped
Interrupt and exit a busy Claude second mate without leaving the old agent running ✅ pass live claude-slash-menu-live-final.log: a foreground tool call was observed before fm-control exit reported stopped
Restart the actual lighthouse and bluefin mates and verify their replacements ⏸️ untested no This phase has no authority to mutate the production FM_HOME or live Herdr fleet. An operator must perform and verify those restarts outside this isolated gate test.
Evidence: Live Claude slash-menu and control-plane exit transcript

Source: Live Claude slash-menu and control-plane exit transcript

ok - live Claude slash menu: Claude Code (2.1.282 (Claude Code)) on herdr 0.8.2 hides the composer from the 20-row tail on a 39-row pane, and the widened proof read shows /exit
ok - live Claude slash menu: fm-control exit stops an idle classic-renderer Claude Code (2.1.282 (Claude Code)) on herdr 0.8.2
ok - live Claude slash menu: fm-control exit interrupts and stops a busy classic-renderer Claude Code (2.1.282 (Claude Code)) on herdr 0.8.2

Pipeline

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.

  • Live validation: ✅ go - 2 of 3 scenarios driven live against the product
Scenario Result Live Evidence
Exit an idle Claude second mate after its slash menu hides the composer from a short Herdr read ✅ pass live claude-slash-menu-live-final.log: the 20-row read missed /exit, the widened read found it, and fm-control exit reported stopped
Interrupt and exit a busy Claude second mate without leaving the old agent running ✅ pass live claude-slash-menu-live-final.log: a foreground tool call was observed before fm-control exit reported stopped
Restart the actual lighthouse and bluefin mates and verify their replacements ⏸️ untested no This phase has no authority to mutate the production FM_HOME or live Herdr fleet. An operator must perform and verify those restarts outside this isolated gate test.
  • tests/fm-backend-herdr.test.sh
  • FM_HERDR_SLASH_MENU_LIVE=1 tests/fm-herdr-claude-slash-menu-live-e2e.test.sh in a named, torn-down Herdr lab
  • Retried the live test after fixing its lab-only Claude external-import prompt handling; removed transient worktree test data
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Claude's classic renderer opens its completion menu for a typed /exit or
/<skill> below the composer, sized to about half the pane. On a pane taller
than about 35 rows, the composer row, its bottom border, and that menu fill
the payload proof's 20-row tail, so the tail starts at the composer row
without its top border and the selector refuses it. Every fm-control exit of
such a Claude on Herdr then failed with "the exit command could not be sent",
idle or busy, and a typed slash command sent through fm-send was reported as
never sent. The fullscreen renderer draws the menu above the composer, which
is why it never showed up there.

When the post-typing read selects no composer, the proof now reads once more
at the pane's visible height. The common path keeps its existing calls, the
wider read stays on the visible screen, and the selector still takes the
bottom-most composer.

A fixture of the live shape pins the widened proof and the unchanged refusal
without a viewport height, and an opt-in live guard forces the classic
renderer in an isolated Herdr lab and requires idle and busy exits to stop.
@d1on

d1on commented Sep 27, 2026

Copy link
Copy Markdown
Author

Superseded by #5876, which fixes the same slash-command popup hiding the Herdr composer during remote second-mate restarts. Verified: remote second-mate restarts now succeed automatically on 050a446. Closing in favour of #5876.

@d1on d1on closed this Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant