Skip to content

fix(bin): stop idle Codex footers from skipping steering rings - #69

Merged
peterOC26 merged 9 commits into
mainfrom
fm/fm-send-doorbell-codex-miss-d1
Nov 15, 2026
Merged

peterOC26 merged 9 commits into
mainfrom
fm/fm-send-doorbell-codex-miss-d1

Conversation

@peterOC26

@peterOC26 peterOC26 commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Intent

Steer doorbell does not reach idle Codex panes.

Seen 3 times on 2026-11-07 (02:00-02:20Z): fm-send wrote the steering record (pv-live-migration-runner-m1 messages 003 and 004, pv-handoff-rest-bound-b1 023) but the idle Codex pane never received the doorbell: no line in the composer, the record was not picked up for 60-120 s or more, and the watcher re-ring did not land in that time. Typing the exact doorbell line with herdr pane send-text + Enter delivered it at once each time. Check fm-send ring and the watcher re-ring for idle Codex panes (composer pre-check false positive? footer warnings?).

Q2123 answer (2026-11-15): "Q2123 a" - start the 3 most useful firstmate fixes now. Earlier standing word (2026-11-15, Jobs page note 1794703235-3uxISq): "The 11 firstmate fixes - do all of these"; Grok builds, DeepSeek checks, firstmate repo reviews one at a time, captain merges each.

What Changed

  • Codex status, shortcut, context, token, path, and warning footer rows now bound a cursorless bare composer only when the glyph row is empty after ghost and furniture stripping, so an idle pane reads empty on a styled cursorless read and with the cursor on the glyph row.
  • fm_task_inbox_composer_holds drops blank trailing rows and Codex footer rows before the doorbell comparison, so a stuck doorbell under that footer is submitted on re-ring while any other trailing draft text still skips.
  • Composer and inbox regressions, the 2026-11-15 plain-text fixture, and runtime-backend notes cover those footer verdicts, including typed wraps and non-footer prose that stay pending.

Risk Assessment

⚠️ Medium: The classifier and doorbell read-back changes are well-scoped, tested, and match the decisions from earlier rounds. One reachable gap remains: on zellij, the first ring to a Codex pane is still delayed because the append proof still includes the footer text. It can be handled as a follow-up.

Testing

On an isolated Herdr lab, real Codex 0.167 rendered its status and shortcut/warning footer under an idle › and the product classifier read empty. fm-send then submitted the doorbell, left a half-typed draft unsent, and recovered a stuck doorbell that still had those footer rows underneath.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Idle Codex pane on an isolated Herdr lab classifies empty, so the doorbell pre-check does not skip ✅ pass live ~/.no-mistakes/evidence/01M7FHVY0R2386SBZWADADSQ3R/codex-ring-idle.txt
fm-send types and submits the steering doorbell into that idle Codex pane ✅ pass live ~/.no-mistakes/evidence/01M7FHVY0R2386SBZWADADSQ3R/codex-ring-after.txt
A half-typed Codex draft is not submitted when the doorbell rings ✅ pass live ~/.no-mistakes/evidence/01M7FHVY0R2386SBZWADADSQ3R/codex-guard-skip-summary.txt
A stuck doorbell sitting above the real Codex footer is submitted instead of skipped ✅ pass live ~/.no-mistakes/evidence/01M7FHVY0R2386SBZWADADSQ3R/codex-guard-rering-summary.txt
Evidence: Live Herdr pane captures for idle classification, draft skip, doorbell submit, and stuck re-ring

Source: Live Herdr pane captures for idle classification, draft skip, doorbell submit, and stuck re-ring

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Live Codex doorbell on isolated Herdr</title>
<style>
  body { font-family: ui-sans-serif, system-ui, sans-serif; background: #111; color: #eee; margin: 24px; }
  h1 { font-size: 20px; }
  h2 { font-size: 16px; margin-top: 28px; }
  p { color: #bbb; max-width: 860px; }
  pre { background: #1b1b1b; color: #d6d6d6; border: 1px solid #333; padding: 12px 16px; overflow: auto; white-space: pre; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.35; }
  .ok { color: #9dcc6a; }
</style>
</head>
<body>
<h1>Live Codex 0.167 on an isolated Herdr lab</h1>
<p>Codex was launched with the fleet flags <code>codex --dangerously-bypass-approvals-and-sandbox --disable hooks</code> in session <code>fm-lab-doorbell-1593525-30348</code>. Startup choosers were dismissed without persisting settings (option 1, then Escape on the update dialog). The default Herdr session was not used.</p>

<h2>1. Idle composer classified empty</h2>
<p class="ok">fm_backend_herdr_composer_state returned empty. The real footer is the status row plus the combined shortcut/warning row, with no braille starfield between them.</p>
<pre>› Ask Codex to do anything

  GPT-6.1-Sol default · ~/.no-mistakes/worktrees/7f0ec18181b6/01M7FHVY0R2386SBZWADADSQ3R
  ← for agents · ? for shortcuts                                                              ⚠ 1 warning · f2 to view</pre>

<h2>2. Half-typed draft was not submitted</h2>
<p class="ok">fm-send printed “doorbell skipped (composer visibly holds pending text)”. The draft was still in the composer afterward. Native status stayed done.</p>
<pre>› DRAFTKEEP-7f0ec please do not submit this half typed note

  GPT-6.1-Sol default · ~/.no-mistakes/worktrees/7f0ec18181b6/01M7FHVY0R2386SBZWADADSQ3R
                                                                                               ⚠ 1 warning · f2 to view</pre>

<h2>3. fm-send typed and submitted the doorbell</h2>
<p class="ok">No skip notice. The line left the composer and Codex showed Working. The composer returned to the idle placeholder.</p>
<pre>› : Firstmate instruction waiting: list "$FM_TASK_INBOX"/*.msg in your 'codex-ring.inbox' steering inbox, read and act
  on each in numeric order, then mv each into its handled/.

• Working (0s • esc to interrupt)

› Ask Codex to do anything

  GPT-6.1-Sol default · ~/.no-mistakes/worktrees/7f0ec18181b6/01M7FHVY0R2386SBZWADADSQ3R
  ← for agents · ? for shortcuts                                                              ⚠ 1 warning · f2 to view</pre>

<h2>4. Stuck doorbell above the footer was submitted</h2>
<p>Before the ring, the doorbell sat in the composer with the status and warning rows still underneath. The hold check matched. fm-send did not skip; it pressed Enter.</p>
<pre>BEFORE
› : Firstmate instruction waiting: list "$FM_TASK_INBOX"/*.msg in your 'codex-guard.inbox' steering inbox, read and act
  on each in numeric order, then mv each into its handled/.

  GPT-6.1-Sol default · ~/.no-mistakes/worktrees/7f0ec18181b6/01M7FHVY0R2386SBZWADADSQ3R
                                                                                               ⚠ 1 warning · f2 to view

AFTER
› : Firstmate instruction waiting: list "$FM_TASK_INBOX"/*.msg in your 'codex-guard.inbox' steering inbox, read and act
  on each in numeric order, then mv each into its handled/.

• Working (0s • esc to interrupt)

› Ask Codex to do anything</pre>
</body>
</html>
Evidence: Idle Codex pane classified empty

Source: Idle Codex pane classified empty

╭─────────────────────────────────────────────────╮
│ ✨ Update available! 0.167.0 -> 0.169.0         │
│ Run npm install -g @openai/codex to update.     │
│                                                 │
│ See full release notes:                         │
│ https://github.com/openai/codex/releases/latest │
╰─────────────────────────────────────────────────╯


  >_ OpenAI Codex (v0.167.0)
     ~/.no-mistakes/worktrees/7f0ec18181b6/01M7FHVY0R2386SBZWADADSQ3R
  permissions: YOLO mode
























› Ask Codex to do anything

  GPT-6.1-Sol default · ~/.no-mistakes/worktrees/7f0ec18181b6/01M7FHVY0R2386SBZWADADSQ3R
  ← for agents · ? for shortcuts                                                              ⚠ 1 warning · f2 to view
Evidence: Doorbell submitted into the idle Codex pane

Source: Doorbell submitted into the idle Codex pane

╭─────────────────────────────────────────────────╮
│ ✨ Update available! 0.167.0 -> 0.169.0         │
│ Run npm install -g @openai/codex to update.     │
│                                                 │
│ See full release notes:                         │
│ https://github.com/openai/codex/releases/latest │
╰─────────────────────────────────────────────────╯


  >_ OpenAI Codex (v0.167.0)
     ~/.no-mistakes/worktrees/7f0ec18181b6/01M7FHVY0R2386SBZWADADSQ3R
  permissions: YOLO mode


› : Firstmate instruction waiting: list "$FM_TASK_INBOX"/*.msg in your 'codex-ring.inbox' steering inbox, read and act
  on each in numeric order, then mv each into its handled/.

















• Working (0s • esc to interrupt)


› Ask Codex to do anything

  GPT-6.1-Sol default · ~/.no-mistakes/worktrees/7f0ec18181b6/01M7FHVY0R2386SBZWADADSQ3R
  ← for agents · ? for shortcuts                                                              ⚠ 1 warning · f2 to view
Evidence: Half-typed draft still present after the skipped ring

Source: Half-typed draft still present after the skipped ring

╭─────────────────────────────────────────────────╮
│ ✨ Update available! 0.167.0 -> 0.169.0         │
│ Run npm install -g @openai/codex to update.     │
│                                                 │
│ See full release notes:                         │
│ https://github.com/openai/codex/releases/latest │
╰─────────────────────────────────────────────────╯


  >_ OpenAI Codex (v0.167.0)
     ~/.no-mistakes/worktrees/7f0ec18181b6/01M7FHVY0R2386SBZWADADSQ3R
  permissions: YOLO mode
























› DRAFTKEEP-7f0ec please do not submit this half typed note

  GPT-6.1-Sol default · ~/.no-mistakes/worktrees/7f0ec18181b6/01M7FHVY0R2386SBZWADADSQ3R
                                                                                               ⚠ 1 warning · f2 to view
Evidence: Stuck doorbell before the re-ring, footer still underneath

Source: Stuck doorbell before the re-ring, footer still underneath

╭─────────────────────────────────────────────────╮
│ ✨ Update available! 0.167.0 -> 0.169.0         │
│ Run npm install -g @openai/codex to update.     │
│                                                 │
│ See full release notes:                         │
│ https://github.com/openai/codex/releases/latest │
╰─────────────────────────────────────────────────╯


  >_ OpenAI Codex (v0.167.0)
     ~/.no-mistakes/worktrees/7f0ec18181b6/01M7FHVY0R2386SBZWADADSQ3R
  permissions: YOLO mode























› : Firstmate instruction waiting: list "$FM_TASK_INBOX"/*.msg in your 'codex-guard.inbox' steering inbox, read and act
  on each in numeric order, then mv each into its handled/.

  GPT-6.1-Sol default · ~/.no-mistakes/worktrees/7f0ec18181b6/01M7FHVY0R2386SBZWADADSQ3R
                                                                                               ⚠ 1 warning · f2 to view
Evidence: Stuck doorbell submitted by the re-ring

Source: Stuck doorbell submitted by the re-ring

╭─────────────────────────────────────────────────╮
│ ✨ Update available! 0.167.0 -> 0.169.0         │
│ Run npm install -g @openai/codex to update.     │
│                                                 │
│ See full release notes:                         │
│ https://github.com/openai/codex/releases/latest │
╰─────────────────────────────────────────────────╯


  >_ OpenAI Codex (v0.167.0)
     ~/.no-mistakes/worktrees/7f0ec18181b6/01M7FHVY0R2386SBZWADADSQ3R
  permissions: YOLO mode


› : Firstmate instruction waiting: list "$FM_TASK_INBOX"/*.msg in your 'codex-guard.inbox' steering inbox, read and act
  on each in numeric order, then mv each into its handled/.

















• Working (0s • esc to interrupt)


› Ask Codex to do anything

  GPT-6.1-Sol default · ~/.no-mistakes/worktrees/7f0ec18181b6/01M7FHVY0R2386SBZWADADSQ3R
  ← for agents · ? for shortcuts                                                               ⚠ 1 warning · f2 to view

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 warning
  • 🚨 bin/fm-composer-lib.sh:1715 - The new footer check in _fm_composer_wrap_region_ok (line 1715) applies to every row between the glyph row and the cursor row. On a backend that reports the cursor (tmux), typed input can wrap onto a row that holds only a path (~/project/src/main.rs, ~/notes/todo.md) or a token cell (12k tokens). The cursor then sits on or below that row, the wrap check fails, and the verdict falls through to the strict unknown instead of pending. I checked this against both the base and the head lib: screen transcript\n\n› please review the change in\n~/project/src/main.rs with the cursor on row 3 read pending before the change and reads unknown after it. fm_task_inbox_ring (bin/fm-task-inbox-lib.sh:420-433) only skips on an exact pending and rings on unknown. So it now types the doorbell after the user's half-typed draft and presses Enter, which submits that draft. That is exactly the hazard the skip exists to prevent. It affects every bare-glyph harness, not just Codex. The intent does not need this check: an idle Codex pane has its cursor on the glyph row, so _fm_composer_wrap_region_ok is never asked about the footer. The only thing this check adds is the synthetic case codex cursor on the status footer → unknown (tests/fm-composer-lib.test.sh:806). Without the check that case would read pending, which skips the ring and is the safe outcome. Smallest fix: remove the _fm_composer_row_is_codex_footer line from _fm_composer_wrap_region_ok and drop or invert that test assertion. Keep the boundary only in the cursorless walk in _fm_composer_select_cursorless (line 2230). There, a footer match only shortens the selection after a non-empty glyph row, so the verdict stays pending.
  • ⚠️ bin/fm-composer-lib.sh:725 - The fix assumes a failing layout that no real capture confirms. The docs entry itself says 'No live Herdr pane was driven for this entry', and every new fixture is synthetic (› with the footer on the very next row). The only real Codex capture in the repo (codex 0.154, tests/fm-composer-lib.test.sh:680-700) has a padding/starfield row between › and the status footer. A blank padding row already stopped the wrap before this change, so the old code would already have read that idle pane as empty. The new regex also misses a common one-row Codex hint layout: ? for shortcuts on the left with 100% context left pushed to the right by spaces. I checked: _fm_composer_row_is_codex_footer does not match that row, and transcript\n\n›\n? for shortcuts 100% context left still reads pending. The ? for shortcuts alternative requires the hint to fill the whole row, and the context alternative requires it to start the row or follow ·. So for the three 2026-11-07 misses, which ran on Herdr, the intent's question ('composer pre-check false positive? footer warnings?') is not shown to be answered. The ring and re-ring may still skip if the real footer is this combined hint row, or the miss may have another cause. Before treating this as the durable fix, capture an idle pane the way the 0.154 entry did (pane read --format ansi) and add it as a byte-exact fixture. Getting that live capture is the step that needs a human. If the capture shows the combined row, also accept a context or token cell preceded by a run of two or more spaces.

🔧 Fix applied.
3 issues (2 errors, 1 warning) still open:

  • 🚨 bin/fm-composer-lib.sh:1715 - The new footer check in _fm_composer_wrap_region_ok (line 1715) applies to every row between the glyph row and the cursor row. On a backend that reports the cursor (tmux), typed input can wrap onto a row that holds only a path (~/project/src/main.rs, ~/notes/todo.md) or a token cell (12k tokens). The cursor then sits on or below that row, the wrap check fails, and the verdict falls through to the strict unknown instead of pending. I checked this against both the base and the head lib: screen transcript\n\n› please review the change in\n~/project/src/main.rs with the cursor on row 3 read pending before the change and reads unknown after it. fm_task_inbox_ring (bin/fm-task-inbox-lib.sh:420-433) only skips on an exact pending and rings on unknown. So it now types the doorbell after the user's half-typed draft and presses Enter, which submits that draft. That is exactly the hazard the skip exists to prevent. It affects every bare-glyph harness, not just Codex. The intent does not need this check: an idle Codex pane has its cursor on the glyph row, so _fm_composer_wrap_region_ok is never asked about the footer. The only thing this check adds is the synthetic case codex cursor on the status footer → unknown (tests/fm-composer-lib.test.sh:806). Without the check that case would read pending, which skips the ring and is the safe outcome. Smallest fix: remove the _fm_composer_row_is_codex_footer line from _fm_composer_wrap_region_ok and drop or invert that test assertion. Keep the boundary only in the cursorless walk in _fm_composer_select_cursorless (line 2230). There, a footer match only shortens the selection after a non-empty glyph row, so the verdict stays pending.
  • ⚠️ bin/fm-composer-lib.sh:725 - The fix assumes a failing layout that no real capture confirms. The docs entry itself says 'No live Herdr pane was driven for this entry', and every new fixture is synthetic (› with the footer on the very next row). The only real Codex capture in the repo (codex 0.154, tests/fm-composer-lib.test.sh:680-700) has a padding/starfield row between › and the status footer. A blank padding row already stopped the wrap before this change, so the old code would already have read that idle pane as empty. The new regex also misses a common one-row Codex hint layout: ? for shortcuts on the left with 100% context left pushed to the right by spaces. I checked: _fm_composer_row_is_codex_footer does not match that row, and transcript\n\n›\n? for shortcuts 100% context left still reads pending. The ? for shortcuts alternative requires the hint to fill the whole row, and the context alternative requires it to start the row or follow ·. So for the three 2026-11-07 misses, which ran on Herdr, the intent's question ('composer pre-check false positive? footer warnings?') is not shown to be answered. The ring and re-ring may still skip if the real footer is this combined hint row, or the miss may have another cause. Before treating this as the durable fix, capture an idle pane the way the 0.154 entry did (pane read --format ansi) and add it as a byte-exact fixture. Getting that live capture is the step that needs a human. If the capture shows the combined row, also accept a context or token cell preceded by a run of two or more spaces.
  • 🚨 bin/fm-composer-lib.sh:2229 - This regression was in the original change. Round 1 kept it on purpose because the verdict stays pending. That reasoning missed the callers that read the extracted text, not just the verdict.

What goes wrong: the new _fm_composer_row_is_codex_footer &amp;&amp; break in the cursorless bare walk runs on every row under ANY bare glyph, including Claude's ❯ between its rules. So any typed wrap or continuation row that is only a path (~/project/src/main.rs, ~/a.sh), only 12k tokens, or contains ⚠ N warning now ends the selected composer. fm_composer_extract_selected_content then returns a shortened draft.

Checked against base and head with styled cursorless caps:

  • Claude screen ─rule / ❯ please review these files and fix the bug in / ~/project/src/main.rs / ─rule: base extracts the full text, head extracts please review these files and fix the bug in.
  • The › equivalent behaves the same way.

Callers that need the full text:

  • bin/backends/herdr.sh:3576-3583: the Claude payload proof in fm_backend_herdr_send_text_submit, reached from fm-send.sh:1273 with an arbitrary MESSAGE. fm_backend_herdr_composer_payload_shown (herdr.sh:3537) requires exact equality, so the shortened read fails the proof. The composer is cleared with Ctrl+U and fm-send gets send-failed. On the Herdr/Claude fleet, a message that ends with a path wrapping onto its own row, or that has a path-only line, can no longer be delivered.
  • bin/backends/zellij.sh:556 fm_backend_zellij_composer_observed_append: the same exact-match proof, for every bare harness on zellij.
  • bin/fm-task-inbox-lib.sh:451 fm_task_inbox_composer_holds: the same class, though the doorbell line itself is unlikely to wrap into a matching row.

The intent only needs the footer to bound an IDLE glyph.

Fix: apply the Codex footer break only when the glyph row's ghost-stripped content is empty (_fm_composer_row_content with the screen's styling, then glyph and furniture stripping). A typed draft then keeps its whole wrap, and the idle › with dim placeholder plus footer still stops at the footer.

Tests to update:

  • The new cursorless cases (tests/fm-composer-lib.test.sh:835-842) assert only the pending verdict. They pass with the truncation, so they cannot catch it. Add an extraction equality assertion for the path, token and warning tails.
  • The fix the login + warning extraction assertion (around line 853) encodes the truncating behaviour and needs revisiting.

🔧 Fix applied.
5 issues (2 errors, 2 warnings, 1 info) still open:

  • 🚨 bin/fm-composer-lib.sh:1715 - The new footer check in _fm_composer_wrap_region_ok (line 1715) applies to every row between the glyph row and the cursor row. On a backend that reports the cursor (tmux), typed input can wrap onto a row that holds only a path (~/project/src/main.rs, ~/notes/todo.md) or a token cell (12k tokens). The cursor then sits on or below that row, the wrap check fails, and the verdict falls through to the strict unknown instead of pending. I checked this against both the base and the head lib: screen transcript\n\n› please review the change in\n~/project/src/main.rs with the cursor on row 3 read pending before the change and reads unknown after it. fm_task_inbox_ring (bin/fm-task-inbox-lib.sh:420-433) only skips on an exact pending and rings on unknown. So it now types the doorbell after the user's half-typed draft and presses Enter, which submits that draft. That is exactly the hazard the skip exists to prevent. It affects every bare-glyph harness, not just Codex. The intent does not need this check: an idle Codex pane has its cursor on the glyph row, so _fm_composer_wrap_region_ok is never asked about the footer. The only thing this check adds is the synthetic case codex cursor on the status footer → unknown (tests/fm-composer-lib.test.sh:806). Without the check that case would read pending, which skips the ring and is the safe outcome. Smallest fix: remove the _fm_composer_row_is_codex_footer line from _fm_composer_wrap_region_ok and drop or invert that test assertion. Keep the boundary only in the cursorless walk in _fm_composer_select_cursorless (line 2230). There, a footer match only shortens the selection after a non-empty glyph row, so the verdict stays pending.
  • ⚠️ bin/fm-composer-lib.sh:725 - The fix assumes a failing layout that no real capture confirms. The docs entry itself says 'No live Herdr pane was driven for this entry', and every new fixture is synthetic (› with the footer on the very next row). The only real Codex capture in the repo (codex 0.154, tests/fm-composer-lib.test.sh:680-700) has a padding/starfield row between › and the status footer. A blank padding row already stopped the wrap before this change, so the old code would already have read that idle pane as empty. The new regex also misses a common one-row Codex hint layout: ? for shortcuts on the left with 100% context left pushed to the right by spaces. I checked: _fm_composer_row_is_codex_footer does not match that row, and transcript\n\n›\n? for shortcuts 100% context left still reads pending. The ? for shortcuts alternative requires the hint to fill the whole row, and the context alternative requires it to start the row or follow ·. So for the three 2026-11-07 misses, which ran on Herdr, the intent's question ('composer pre-check false positive? footer warnings?') is not shown to be answered. The ring and re-ring may still skip if the real footer is this combined hint row, or the miss may have another cause. Before treating this as the durable fix, capture an idle pane the way the 0.154 entry did (pane read --format ansi) and add it as a byte-exact fixture. Getting that live capture is the step that needs a human. If the capture shows the combined row, also accept a context or token cell preceded by a run of two or more spaces.
  • 🚨 bin/fm-composer-lib.sh:2229 - This regression was in the original change. Round 1 kept it on purpose because the verdict stays pending. That reasoning missed the callers that read the extracted text, not just the verdict.

What goes wrong: the new _fm_composer_row_is_codex_footer &amp;&amp; break in the cursorless bare walk runs on every row under ANY bare glyph, including Claude's ❯ between its rules. So any typed wrap or continuation row that is only a path (~/project/src/main.rs, ~/a.sh), only 12k tokens, or contains ⚠ N warning now ends the selected composer. fm_composer_extract_selected_content then returns a shortened draft.

Checked against base and head with styled cursorless caps:

  • Claude screen ─rule / ❯ please review these files and fix the bug in / ~/project/src/main.rs / ─rule: base extracts the full text, head extracts please review these files and fix the bug in.
  • The › equivalent behaves the same way.

Callers that need the full text:

  • bin/backends/herdr.sh:3576-3583: the Claude payload proof in fm_backend_herdr_send_text_submit, reached from fm-send.sh:1273 with an arbitrary MESSAGE. fm_backend_herdr_composer_payload_shown (herdr.sh:3537) requires exact equality, so the shortened read fails the proof. The composer is cleared with Ctrl+U and fm-send gets send-failed. On the Herdr/Claude fleet, a message that ends with a path wrapping onto its own row, or that has a path-only line, can no longer be delivered.
  • bin/backends/zellij.sh:556 fm_backend_zellij_composer_observed_append: the same exact-match proof, for every bare harness on zellij.
  • bin/fm-task-inbox-lib.sh:451 fm_task_inbox_composer_holds: the same class, though the doorbell line itself is unlikely to wrap into a matching row.

The intent only needs the footer to bound an IDLE glyph.

Fix: apply the Codex footer break only when the glyph row's ghost-stripped content is empty (_fm_composer_row_content with the screen's styling, then glyph and furniture stripping). A typed draft then keeps its whole wrap, and the idle › with dim placeholder plus footer still stops at the footer.

Tests to update:

  • The new cursorless cases (tests/fm-composer-lib.test.sh:835-842) assert only the pending verdict. They pass with the truncation, so they cannot catch it. Add an extraction equality assertion for the path, token and warning tails.
  • The fix the login + warning extraction assertion (around line 853) encodes the truncating behaviour and needs revisiting.
  • ℹ️ bin/fm-composer-lib.sh:1700 - Several comments now describe the Codex footer rule wrongly. Round 2 removed the footer check from _fm_composer_wrap_region_ok, and round 3 limited the cursorless break to an empty glyph row. Neither round updated these comments:
  • bin/fm-composer-lib.sh:1700-1703: the _fm_composer_wrap_region_ok docstring still says the wrap rows carry "no composer-footer furniture". The function no longer checks for footer rows, and the tests require a cursor on a path-only or token-only wrap row to stay pending.
  • :1644-1645: _fm_composer_row_is_codex_footer says "it bounds the wrap region exactly as an edge does". It does not: it applies only in the cursorless walk, and only under an empty glyph row.
  • :174-177: says the footer rows "bound the wrap the same way a braille row does". Braille rows bound the wrap unconditionally; footer rows do not.
  • :79-83 (bare-shape header) and :720-724 (the regex comment): both present the Codex footer as a general wrap boundary, alongside omp's status row and braille rows.

A future maintainer could trust these comments and put the footer check back into the cursor-confirmed wrap check. That would bring back the round-1 regression, where a half-typed draft is submitted. Fix: reword the comments to say the footer bounds only the cursorless bare walk, and only when the glyph row is empty after ghost and furniture stripping.

  • ⚠️ bin/fm-composer-lib.sh:1647 - Simplification: _fm_composer_row_is_codex_footer reads ${FM_COMPOSER_CODEX_FOOTER_RE:-$FM_COMPOSER_CODEX_FOOTER_RE_DEFAULT}. That adds a new environment variable that can override the footer regex. Nothing in the repo sets it, and neither the docs nor the tests mention it. The intent only needs idle Codex footers to bound an empty ›. It does not ask for a runtime-configurable footer pattern. Recommended remedy: remove the override and match against FM_COMPOSER_CODEX_FOOTER_RE_DEFAULT directly, as _fm_composer_row_is_pi_status does. This is a product-scope decision, so it needs the author's call.

🔧 Fix applied.
6 issues (2 errors, 3 warnings, 1 info) still open:

  • 🚨 bin/fm-composer-lib.sh:1715 - The new footer check in _fm_composer_wrap_region_ok (line 1715) applies to every row between the glyph row and the cursor row. On a backend that reports the cursor (tmux), typed input can wrap onto a row that holds only a path (~/project/src/main.rs, ~/notes/todo.md) or a token cell (12k tokens). The cursor then sits on or below that row, the wrap check fails, and the verdict falls through to the strict unknown instead of pending. I checked this against both the base and the head lib: screen transcript\n\n› please review the change in\n~/project/src/main.rs with the cursor on row 3 read pending before the change and reads unknown after it. fm_task_inbox_ring (bin/fm-task-inbox-lib.sh:420-433) only skips on an exact pending and rings on unknown. So it now types the doorbell after the user's half-typed draft and presses Enter, which submits that draft. That is exactly the hazard the skip exists to prevent. It affects every bare-glyph harness, not just Codex. The intent does not need this check: an idle Codex pane has its cursor on the glyph row, so _fm_composer_wrap_region_ok is never asked about the footer. The only thing this check adds is the synthetic case codex cursor on the status footer → unknown (tests/fm-composer-lib.test.sh:806). Without the check that case would read pending, which skips the ring and is the safe outcome. Smallest fix: remove the _fm_composer_row_is_codex_footer line from _fm_composer_wrap_region_ok and drop or invert that test assertion. Keep the boundary only in the cursorless walk in _fm_composer_select_cursorless (line 2230). There, a footer match only shortens the selection after a non-empty glyph row, so the verdict stays pending.
  • ⚠️ bin/fm-composer-lib.sh:725 - The fix assumes a failing layout that no real capture confirms. The docs entry itself says 'No live Herdr pane was driven for this entry', and every new fixture is synthetic (› with the footer on the very next row). The only real Codex capture in the repo (codex 0.154, tests/fm-composer-lib.test.sh:680-700) has a padding/starfield row between › and the status footer. A blank padding row already stopped the wrap before this change, so the old code would already have read that idle pane as empty. The new regex also misses a common one-row Codex hint layout: ? for shortcuts on the left with 100% context left pushed to the right by spaces. I checked: _fm_composer_row_is_codex_footer does not match that row, and transcript\n\n›\n? for shortcuts 100% context left still reads pending. The ? for shortcuts alternative requires the hint to fill the whole row, and the context alternative requires it to start the row or follow ·. So for the three 2026-11-07 misses, which ran on Herdr, the intent's question ('composer pre-check false positive? footer warnings?') is not shown to be answered. The ring and re-ring may still skip if the real footer is this combined hint row, or the miss may have another cause. Before treating this as the durable fix, capture an idle pane the way the 0.154 entry did (pane read --format ansi) and add it as a byte-exact fixture. Getting that live capture is the step that needs a human. If the capture shows the combined row, also accept a context or token cell preceded by a run of two or more spaces.
  • 🚨 bin/fm-composer-lib.sh:2229 - This regression was in the original change. Round 1 kept it on purpose because the verdict stays pending. That reasoning missed the callers that read the extracted text, not just the verdict.

What goes wrong: the new _fm_composer_row_is_codex_footer &amp;&amp; break in the cursorless bare walk runs on every row under ANY bare glyph, including Claude's ❯ between its rules. So any typed wrap or continuation row that is only a path (~/project/src/main.rs, ~/a.sh), only 12k tokens, or contains ⚠ N warning now ends the selected composer. fm_composer_extract_selected_content then returns a shortened draft.

Checked against base and head with styled cursorless caps:

  • Claude screen ─rule / ❯ please review these files and fix the bug in / ~/project/src/main.rs / ─rule: base extracts the full text, head extracts please review these files and fix the bug in.
  • The › equivalent behaves the same way.

Callers that need the full text:

  • bin/backends/herdr.sh:3576-3583: the Claude payload proof in fm_backend_herdr_send_text_submit, reached from fm-send.sh:1273 with an arbitrary MESSAGE. fm_backend_herdr_composer_payload_shown (herdr.sh:3537) requires exact equality, so the shortened read fails the proof. The composer is cleared with Ctrl+U and fm-send gets send-failed. On the Herdr/Claude fleet, a message that ends with a path wrapping onto its own row, or that has a path-only line, can no longer be delivered.
  • bin/backends/zellij.sh:556 fm_backend_zellij_composer_observed_append: the same exact-match proof, for every bare harness on zellij.
  • bin/fm-task-inbox-lib.sh:451 fm_task_inbox_composer_holds: the same class, though the doorbell line itself is unlikely to wrap into a matching row.

The intent only needs the footer to bound an IDLE glyph.

Fix: apply the Codex footer break only when the glyph row's ghost-stripped content is empty (_fm_composer_row_content with the screen's styling, then glyph and furniture stripping). A typed draft then keeps its whole wrap, and the idle › with dim placeholder plus footer still stops at the footer.

Tests to update:

  • The new cursorless cases (tests/fm-composer-lib.test.sh:835-842) assert only the pending verdict. They pass with the truncation, so they cannot catch it. Add an extraction equality assertion for the path, token and warning tails.
  • The fix the login + warning extraction assertion (around line 853) encodes the truncating behaviour and needs revisiting.
  • ℹ️ bin/fm-composer-lib.sh:1700 - Several comments now describe the Codex footer rule wrongly. Round 2 removed the footer check from _fm_composer_wrap_region_ok, and round 3 limited the cursorless break to an empty glyph row. Neither round updated these comments:
  • bin/fm-composer-lib.sh:1700-1703: the _fm_composer_wrap_region_ok docstring still says the wrap rows carry "no composer-footer furniture". The function no longer checks for footer rows, and the tests require a cursor on a path-only or token-only wrap row to stay pending.
  • :1644-1645: _fm_composer_row_is_codex_footer says "it bounds the wrap region exactly as an edge does". It does not: it applies only in the cursorless walk, and only under an empty glyph row.
  • :174-177: says the footer rows "bound the wrap the same way a braille row does". Braille rows bound the wrap unconditionally; footer rows do not.
  • :79-83 (bare-shape header) and :720-724 (the regex comment): both present the Codex footer as a general wrap boundary, alongside omp's status row and braille rows.

A future maintainer could trust these comments and put the footer check back into the cursor-confirmed wrap check. That would bring back the round-1 regression, where a half-typed draft is submitted. Fix: reword the comments to say the footer bounds only the cursorless bare walk, and only when the glyph row is empty after ghost and furniture stripping.

  • ⚠️ bin/fm-composer-lib.sh:1647 - Simplification: _fm_composer_row_is_codex_footer reads ${FM_COMPOSER_CODEX_FOOTER_RE:-$FM_COMPOSER_CODEX_FOOTER_RE_DEFAULT}. That adds a new environment variable that can override the footer regex. Nothing in the repo sets it, and neither the docs nor the tests mention it. The intent only needs idle Codex footers to bound an empty ›. It does not ask for a runtime-configurable footer pattern. Recommended remedy: remove the override and match against FM_COMPOSER_CODEX_FOOTER_RE_DEFAULT directly, as _fm_composer_row_is_pi_status does. This is a product-scope decision, so it needs the author's call.
  • ⚠️ bin/fm-composer-lib.sh:2236 - This is an existing gap next to the re-ring symptom in the intent. The change did not cause it, and it is still reachable.

What it covers: in fm_task_inbox_ring (bin/fm-task-inbox-lib.sh:421-431), a pending composer that holds exactly our own doorbell line is the 'previous ring whose Enter never landed' case. Only that path lets the watcher re-ring submit it.

How it fails on an idle Codex pane:

  1. A ring types the doorbell, but its Enter is lost.
  2. The › glyph row now holds : Firstmate instruction waiting: … (it wraps), with Codex's status and hint rows directly underneath.
  3. fm_task_inbox_composer_holds reads the pane with fm_composer_extract_selected_content styled=0 (fm-task-inbox-lib.sh:451).
  4. That read goes through _fm_composer_select_cursorless. Since round 3, the walk stops at a Codex footer row only when glyph_content is empty (fm-composer-lib.sh:2236). Here the glyph row is not empty.
  5. So the walk takes in the status line (GPT-6.1-Sol high · ~/… · …) and the hint row (← for agents · ? for shortcuts ⚠ 1 warning · f2 to view). None of those rows has a structural edge, an omp status, or braille.
  6. The read-back is the doorbell plus the footer text. It never equals the doorbell, so the ring returns 1 (skipped) every time and the ladder escalates instead of delivering.

Why this needs your decision: round 3 kept the footer rows under a non-empty glyph on purpose, so that payload proofs (herdr.sh:3576, zellij.sh:556) see a draft's real path, token, or warning continuation rows. Any fix has to balance those two needs. Options include letting fm_task_inbox_composer_holds accept the doorbell followed only by Codex footer rows, or accepting this gap as out of scope. The reported incidents had no line in the composer, so this is a related failure state rather than the reported one.

🔧 Fix applied.
1 warning still open:

  • ⚠️ bin/fm-task-inbox-lib.sh:451 - This gap existed before this change. The change leaves it in place, and it is still reachable. It is a sibling of the round-4 fix: round 4 trims trailing Codex footer rows only in fm_task_inbox_composer_holds. The other consumer that compares composer read-back to our doorbell, fm_backend_zellij_composer_observed_append (bin/backends/zellij.sh:556, used by fm_backend_zellij_send_text_submit), still reads the untrimmed capture.

How the first ring fails on zellij with an idle Codex worker:

  1. before is read on the idle pane. The glyph row is empty, so the round-3 rule (bin/fm-composer-lib.sh:2236) stops the walk at the footer, and before is empty.
  2. The doorbell is typed.
  3. after is read. The glyph row now has content, so the footer break no longer applies. The status row (GPT-… · ~/… · …) and the hint row (? for shortcuts ⚠ 1 warning · …) get appended to the extracted text. tests/fm-composer-lib.test.sh asserts exactly this retention (fix the login $warn).
  4. after is not equal to before + text, so the proof reports send-failed and Enter is never pressed. fm_task_inbox_ring returns 2, and the doorbell is left typed.
  5. Only a later watcher re-ring delivers it, because the round-4 holds trimming now recognises the stuck doorbell.

This is the delayed-delivery symptom from the intent ("Check fm-send ring and the watcher re-ring for idle Codex panes"), on the zellij backend. Herdr is not affected, because its payload proof only runs for Claude.

The round-3 note says footer rows are kept under a non-empty glyph "so delivery payload proofs receive the complete draft", naming zellij.sh:556. That is the proof this retention breaks for Codex.

Suggested fix: move the trailing-footer trim from fm_task_inbox_composer_holds (fm-task-inbox-lib.sh:451-459) into one helper in fm-composer-lib.sh. Call it from both holds and the zellij append proof, before fm_composer_extract_selected_content. This undoes the round-3 retention for the zellij proof and edits a backend file outside this change, so it needs your decision.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Idle Codex pane on an isolated Herdr lab classifies empty, so the doorbell pre-check does not skip ✅ pass live ~/.no-mistakes/evidence/01M7FHVY0R2386SBZWADADSQ3R/codex-ring-idle.txt
fm-send types and submits the steering doorbell into that idle Codex pane ✅ pass live ~/.no-mistakes/evidence/01M7FHVY0R2386SBZWADADSQ3R/codex-ring-after.txt
A half-typed Codex draft is not submitted when the doorbell rings ✅ pass live ~/.no-mistakes/evidence/01M7FHVY0R2386SBZWADADSQ3R/codex-guard-skip-summary.txt
A stuck doorbell sitting above the real Codex footer is submitted instead of skipped ✅ pass live ~/.no-mistakes/evidence/01M7FHVY0R2386SBZWADADSQ3R/codex-guard-rering-summary.txt
  • bin/fm-herdr-lab.sh provision of session fm-lab-doorbell-1593525-30348, then pane run of codex --dangerously-bypass-approvals-and-sandbox --disable hooks
  • fm_backend_herdr_composer_state on the idle Codex 0.167 pane
  • FM_HOME=<lab> bin/fm-send.sh codex-guard with a half-typed draft already in the composer
  • FM_HOME=<lab> bin/fm-send.sh codex-ring against the empty idle composer
  • fm_task_inbox_composer_holds and bin/fm-send.sh codex-guard on a stuck doorbell sitting above the live footer
✅ **Document** - passed

✅ No issues found.

🔧 **Lint** - 1 issue found → auto-fixed ✅
  • ⚠️ linter found issues (exit code 1)

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Push** - passed

✅ No issues found.

An idle Codex prompt with the status line or hint row directly underneath was read as unsent text, so the ring and its re-ring both skipped the pane. Those rows now stop the wrap, the way a braille starfield row already does.
….sh sourced lib.sh and two production modules without ShellCheck source directives. CI runs with --external-sources from the repo root, so ShellCheck looked for ./lib.sh, reported SC1091, and exited 1. Full suite then failed only as the lane rollup (FM_CI_LANES_FAILED=true). Added the sibling-test directives: source=tests/lib.sh for the helper, and source=/dev/null on both production imports so the test root does not re-analyze modules CI already lints on their own. shellcheck --norc --external-sources, bin/fm-lint.sh on that file, and the test itself all exit 0
…er-lock.test.sh ("the successor never delivered its recovery wake and exited") with an empty successor log. Full suite failed only as the lane rollup (FM_CI_LANES_FAILED=true). The same assertion failed the same day on an unrelated PR, and it reproduced locally: stop_outside_state_locks only inspected published lock symlinks. The holder pid is written into an owner directory before a child links that directory as the lock, so a stop in that window leaves .wake-queue.lock held by a stopped pid. The successor then waits inside the 60s startup lock bound and the test gives up at 20s. The helper now also treats an unpublished owner directory naming that pid as held, except the watch lock itself, which the successor reclaims. 30 sequential runs, 12 parallel runs, the sibling takeover case, and ShellCheck all passed
@peterOC26
peterOC26 merged commit 011b8dd into main Nov 15, 2026
30 checks passed
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