opencode-mission-control
opencode-mission-control copied to clipboard
bug: pane-died hook writes to log file but nothing reads it
Source
Audit report — Appendix B: README vs. Implementation Discrepancies
Description
The README claims "pane-died hook fires, capturing exit status" — and the hook does fire and write to a log file. However, nothing in the codebase reads that log file. Job completion detection relies entirely on polling (isPaneRunning) and mc_report status.
Current Behavior
setPaneDiedHook()intmux.tssets a tmux hook that writes exit status to a file on pane death- The log file is never read by the monitor, orchestrator, or any other component
- Completion is detected by polling
isPaneRunning()(returns false when pane is dead) ormc_reportwithcompletedstatus
Expected Behavior
The pane-died hook should either:
- Option A: Be read by the monitor to get accurate exit codes (0 = success, non-zero = failure) instead of relying solely on polling
- Option B: Be removed if polling + mc_report is the intended detection mechanism (eliminate dead code)
Impact
Without reading the hook output, MC cannot distinguish between:
- Clean exit (exit 0) — job completed successfully
- Crash exit (exit 1+) — job failed with error
- Killed exit (signal) — job was force-stopped
All are currently treated the same by the polling mechanism.
Files
src/lib/tmux.ts—setPaneDiedHook()implementationsrc/lib/monitor.ts— polling loop that should read the hook outputsrc/tools/launch.ts— sets the hook on job launch
Closing as obsolete with Mission Control 2.0 (#94): tmux is no longer used, so there is no pane-died hook. Job completion comes from the session's events and its mc_report.