90944948f5
TUI for orchestrating AI coding harness sessions (Claude Code, Codex, Kiro, etc.) via tmux. Click CLI bootstraps a Textual TUI over ProjectService/SessionService backed by SQLite, spawning harness sessions as tmux windows through TmuxManager. Includes recent fixes: - Visible Tab focus highlight on dialog OK/Cancel buttons - Auto-select first project on launch - Auto-select first session + per-project session-selection memory - tmux new-window targets an explicit free index, fixing "index N in use" failures (broken spawn/attach in attached sessions) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
13 lines
956 B
Markdown
13 lines
956 B
Markdown
# Lessons
|
|
|
|
## 2026-06-09: tmux windows vs sessions
|
|
- **Symptom:** Enter/Shift+R on sessions did nothing; `tmux list-sessions` only showed main session
|
|
- **Cause:** Harness sessions were separate tmux sessions. `switch-client` moves the entire client away. Sessions died silently with no error feedback.
|
|
- **Fix:** Redesigned to use windows within a single `hqt-main` session. `select-window` stays in context. `remain-on-exit` + `respawn-pane` handles dead processes cleanly.
|
|
- **Signal:** If "attach" ever silently fails again, check: does the tmux target actually exist? Is the error being swallowed?
|
|
|
|
## General
|
|
- tmux `remain-on-exit` must be set BEFORE the command can exit (race condition if set after `new-session`/`new-window`)
|
|
- `respawn-pane -k` restarts a dead pane in-place without destroying the window — preferred over kill+recreate
|
|
- Always check and propagate tmux command return codes; silent failures are the worst debugging experience
|