Skip to content
This repository was archived by the owner on Aug 25, 2026. It is now read-only.

fix: retry Codex secondmate sends - #32

Merged
JTInventory merged 2 commits into
mainfrom
fm/firstmate-fm-send-secondmate-submit-recur-0701
Jul 1, 2026
Merged

JTInventory merged 2 commits into
mainfrom
fm/firstmate-fm-send-secondmate-submit-recur-0701

Conversation

@JTInventory

Copy link
Copy Markdown
Owner

Intent

Ship a narrow Firstmate fix so fm-send can submit ordinary marked messages to Codex secondmate windows without leaving typed text in the composer.

What Changed

  • Captain, fm-send now retries Enter submission for Codex secondmate panes when marked text remains pending, so marked messages do not stay in the composer.
  • Adds focused tmux-stub coverage for the Codex secondmate retry path.
  • Documents the retry behavior in the harness adapter guidance and Firstmate script docs.

Risk Assessment

✅ Low: Captain, the change is narrowly scoped to one Codex secondmate retry path and preserves the shared submit core plus existing crewmate/non-Codex behavior.

Testing

Captain, the supplied full-suite baseline was already green; I reran the focused fm-send retry, popup-settle, marker, and settle tests, then captured a stubbed tmux evidence transcript showing the marked Codex secondmate message typed once, three generic Enter attempts leaving the composer pending, and one delayed final Enter clearing it. The worktree was clean after testing.

Evidence: Codex secondmate delayed submit evidence
fm-send codex secondmate delayed-submit evidence
command: bin/fm-send.sh fm-target 'check the queue'
target meta:
  window=sess:fm-target
  harness=codex
  kind=secondmate
exit_code: 0
typed_text_printable: [fm-from-firstmate]|check the queue
typed_text_bytes:
   5b 66 6d 2d 66 72 6f 6d 2d 66 69 72 73 74 6d 61
   74 65 5d 1f 63 68 65 63 6b 20 74 68 65 20 71 75
   65 75 65
enter_attempts: 4
events:
  typed literal once
  enter 1 -> composer still pending
  enter 2 -> composer still pending
  enter 3 -> composer still pending
  enter 4 -> composer cleared
sleep_sequence:
  1.2
  0.4
  0.4
  0.4
  1.2
  0.4
stderr:
  ●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  ●  WATCHER DOWN - SUPERVISION IS OFF
  ●  1 task(s) in flight, but no watcher has a confirmed live lock (lock: no watch lock; last beat: never, grace 300s).
  ●  Trust bin/fm-watch-arm.sh for the true state: it confirms a live watcher and a fresh beacon, or fails loudly.
  ●  Re-arm it NOW: run bin/fm-watch-arm.sh as the harness-tracked background task, or run bin/fm-watch-session.sh start in this environment.
  ●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Evidence: Focused retry test transcript

ok - fm-send: marked Codex secondmate text gets one delayed final Enter ok - fm-send: Codex crewmates keep the generic submit retry behavior ok - fm-send: non-Codex secondmates keep the generic submit retry behavior

ok - fm-send: marked Codex secondmate text gets one delayed final Enter
ok - fm-send: Codex crewmates keep the generic submit retry behavior
ok - fm-send: non-Codex secondmates keep the generic submit retry behavior

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.

  • bash bin/fm-no-mistakes-pr-target-guard.sh || exit 1; command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"
  • Baseline reported by runner as already successful: bash bin/fm-no-mistakes-pr-target-guard.sh || exit 1; command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc".
  • bash tests/fm-send-codex-secondmate-submit-retry.test.sh && bash tests/fm-send-popup-settle.test.sh && bash tests/fm-send-secondmate-marker.test.sh && bash tests/fm-send-settle.test.sh
  • Stubbed tmux evidence run of bin/fm-send.sh fm-target 'check the queue' with harness=codex, kind=secondmate, FM_SEND_RETRIES=3, and composer clearing only on the fourth Enter.
  • bash tests/fm-send-codex-secondmate-submit-retry.test.sh > /tmp/no-mistakes-evidence/01KWF0QQ8M44HF44GNK72014RY/fm-send-codex-secondmate-submit-retry-test.log 2>&1
  • git status --short
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@JTInventory
JTInventory merged commit 528ca21 into main Jul 1, 2026
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant