opencode-mission-control icon indicating copy to clipboard operation
opencode-mission-control copied to clipboard

bug: pane-died hook writes to log file but nothing reads it

Open nigel-dev opened this issue 9 months ago • 1 comments

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

  1. setPaneDiedHook() in tmux.ts sets a tmux hook that writes exit status to a file on pane death
  2. The log file is never read by the monitor, orchestrator, or any other component
  3. Completion is detected by polling isPaneRunning() (returns false when pane is dead) or mc_report with completed status

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() implementation
  • src/lib/monitor.ts — polling loop that should read the hook output
  • src/tools/launch.ts — sets the hook on job launch

nigel-dev avatar Feb 13 '26 18:02 nigel-dev

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.

nigel-dev avatar Nov 20 '26 19:11 nigel-dev