Skip to content

fix(board): preserve sessions when panel restore fails#176

Merged
peters merged 2 commits intomainfrom
fix/restore-panel-failure-recovery
May 1, 2026
Merged

fix(board): preserve sessions when panel restore fails#176
peters merged 2 commits intomainfrom
fix/restore-panel-failure-recovery

Conversation

@peters
Copy link
Copy Markdown
Owner

@peters peters commented Apr 28, 2026

Summary

Fixes #174 by making runtime-state restoration tolerant of individual panel spawn failures.

When one panel cannot be restored, Horizon now:

  • keeps restoring the remaining panels in the session
  • creates a terminal-backed placeholder for the failed panel with the restore error
  • preserves the failed panel original kind, command, args, cwd, layout, local id, and session metadata so it can be restarted after the underlying problem is fixed
  • adds a high-severity attention item for the failed restore instead of silently falling back to an empty board

Root Cause

Board::from_runtime_state_with_transcripts() used ? while restoring each panel, so any single create_panel() failure aborted the whole board restore. The UI then caught that board-level error and replaced the session with Board::new(), making every panel appear lost even though runtime.yaml still existed.

Validation

  • cargo fmt --all -- --check
  • ./scripts/check-maintainability.sh
  • cargo test --workspace
  • cargo clippy --all-targets --all-features -- -D warnings

Note: while investigating corrupt or missing Codex binaries, I found that some executable failures can surface as fast child exits instead of parent-side PTY spawn errors on macOS. This PR fixes the board-abort path described in the issue: any restore-time create_panel() error no longer takes down the full session.

@peters peters marked this pull request as ready for review April 28, 2026 21:04
@peters peters merged commit bb64dcc into main May 1, 2026
13 checks passed
@peters peters deleted the fix/restore-panel-failure-recovery branch May 1, 2026 06:08
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.

Session loss: All panels lost when any single panel fails to restore

1 participant