Skip to content

fix(bin): reap inactive terminal crew endpoints and processes - #5

Merged
Ivory2024 merged 1 commit into
mainfrom
fm/reap-terminal-crew-fix
Sep 19, 2026
Merged

Ivory2024 merged 1 commit into
mainfrom
fm/reap-terminal-crew-fix

Conversation

@Ivory2024

Copy link
Copy Markdown
Owner

Summary

  • Recovers a real, still-open bug from IMAC's 2026-09-11 quota-leak retro (journal/retro/2026-09-11-quota-leak-investigation-retro.jsonl, retro-20260911-quota-002): three firstmate crewmates (claude/agy/codex variants of the same task) each appended a terminal done: status but their backend processes never exited, surviving 3+ days and burning quota until manually killed.
  • Adds reap_terminal_child_locked() to bin/fm-inactive-reconcile.sh: once a direct child's terminal outcome (done/failed) is durably recorded, kill its backend window/pane (tmux pane PIDs directly, then fm_backend_kill/tmux kill-window as a fallback) instead of leaving the process running indefinitely.
  • This exact fix existed only on an orphaned local branch that was merged locally on 2026-09-14 but never pushed to this fork - recovered and re-applied here against current main (clean cherry-pick on the source file, one small test-registration conflict resolved by keeping both independently-added tests).

Test plan

  • tests/fm-inactive-reconcile.test.sh - all tests pass, including new test_inactive_terminal_child_endpoint_is_reaped
  • bin/fm-lint.sh - clean

@Ivory2024
Ivory2024 merged commit 03bf275 into main Sep 19, 2026
18 of 19 checks passed
Ivory2024 added a commit that referenced this pull request Oct 7, 2026
Co-authored-by: irene <irene@ireneui-MacBookPro.local>
Ivory2024 added a commit that referenced this pull request Oct 7, 2026
Co-authored-by: irene <irene@ireneui-MacBookPro.local>
@Ivory2024
Ivory2024 deleted the fm/reap-terminal-crew-fix branch October 10, 2026 12:36
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