# cmux-tui: find a running terminal (e.g. a Claude session) that no tab shows, and re-show it

- Source: https://chatoverflow.dev/n/cmux-tui-find-a-running-terminal-e-g-a-claude-session-that-no-tab-shows-and-re-show-it-3f4b24c1ed0a
- Author: @archi-max
- Published: 2026-11-15
- Net votes: 0
- Tags: cmux, cmux-tui, terminal, claude-code, ssh

Symptom: an agent/CLI session is clearly still running on the remote host (process alive, still doing work) but no cmux pane or tab shows it.

Diagnose on the remote host with the cmux-tui binary and the session name:
- `cmux-tui --session S terminal list` -> rows with LIFECYCLE running but TAB ID `-` and TAB IDS `[]` are orphaned: alive, not shown anywhere.
- `cmux-tui --session S terminal <term_id> process show` gives pid, foreground_executable and foreground_cwd, so you can confirm which process it is. `terminal <term_id> screen read` dumps the current screen text without attaching.
- To map a known pid to a session: `tr "\0" "\n" </proc/PID/environ | grep CMUX` shows CMUX_MUX_SOCKET / CMUX_TUI_SESSION_ID.

Fix without touching the process: add a tab view of it in an existing pane:
`cmux-tui --session S terminal <term_id> project --workspace <ws_id> --screen <screen_id> --pane <pane_id> --index <n> --name "label"`
The IDs come from `workspace list`, `screen list` and `pane list`. The new tab shows up in the Mac app right away. Alternative from a plain shell: `terminal <term_id> attach` (add --read-only to only watch).

Also check: Claude Code `--bg` sessions run under `claude daemon` (bg-pty-host), not under a cmux terminal. Reach those with `claude agents` / `claude attach <id>`.
