- Probe is three-state: an unanswered probe is an Err (tab retries), never
"no tmux" — nothing is pruned or ended on it, opens fail rather than
silently losing persistence.
- Web terminal execs are web-<key>: a desktop reattach no longer
supersedes the web exec, nor does a web close/disconnect touch the
desktop's.
- A tab closed while disconnected is queued (pending_end) and ended at
the next connect; a reattach of a closed/queued id is Ended and is not
remembered again.
- Cost ruling documented: a detached Claude keeps the workspace up
(HostSection note, Sessions flags detached Claude sessions).
- end_all waits for pane pids; the same script runs in the entrypoint's
TERM hook and before the idle watcher's lifetime-cap push.
- TMUX/TMUX_TMPDIR dropped from the client env and reserved.
- Store cleared on a move to Docker and on a death-watch stop.
- Frontend: no duplicate reopen of a tab still opening; quick-exit
backoff then stop; the replay is exactly one chunk, so live output
keeps its URL/OSC/SSO handling.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A tab on a persistent terminal reattaches when its connection drops
(retrying while the tunnel comes back, "[Session ended]" only when the
workspace says it is gone, or the project stopped); closing a tab ends it.
- usePersistentTerminals: once per AWS connection (project id + endpoint)
the terminals this app opened that still run are reopened as tabs, in
order, without taking focus; a reopened tab attaches only after its
listeners are up, so its replayed history and tmux's first draw land.
- Project Home -> Sessions lists the workspace's terminals (open here,
detached, attached elsewhere, opened elsewhere) with Reattach and End.
- The one-time "no tmux in this image" notice is a toast.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tmux sends terminfo's clear when its client exits; without an alternate
screen that wiped Claude's or the shell's last output from the tab.
clear=\E[H keeps it. Checked by feeding tmux's real output into xterm.js:
bash clear, ED 2, a curses alternate screen, a re-attach over an old
screen and Claude Code's TUI all match tmux's own view of the pane, and
300 fast lines all reach the scrollback.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On an AWS project whose image has tmux and /etc/triple-c/tmux.conf, each
tab (Claude and bash, desktop and web terminal) runs its unchanged
command inside its own tmux server, tmux -L triple-c-<session id>, so the
server inherits only that exec's environment (copy-at-connect pairs stay
off argv). App exit, a dropped tunnel and the agent's SIGHUP only detach;
closing a tab ends the session (kill-server).
- host/persistent.rs: command construction, probe cached per tunnel
(forgotten when a tunnel registers), list/history/end/end_all, replay.
- storage/terminal_store.rs: per-project open terminals (id = tmux key,
kind, label) in terminal-sessions.json; pruned by the workspace listing,
cleared on Stop and Remove.
- New commands list_workspace_terminals, reattach_terminal_session
(attach-session, never creates; optional history replay),
end_workspace_terminal; open_terminal_session returns
{persistent, notice} (one-time no-tmux notice).
- Stop ends every tmux server in the step that closes the terminals,
before the WIP push's snapshot.
- ExecSessionManager: an exec that takes a session id over ends the old
one without its exit callback.
- Ignored live test through the real agent (host::persistent::live_tests).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tmux rides the Python apt layer (the last, cheapest one) and
/etc/triple-c/tmux.conf (outside the seed-only home) makes it invisible
behind xterm.js: no prefix, no status line, escape-time 0, truecolor,
OSC 8/52, and smcup@/rmcup@/indn@ so output lands in xterm.js's own
scrollback (xterm.js's CSI S drops lines instead of keeping them).
The entrypoint's TERM hook ends the app's tmux servers before its own
WIP push, so nothing writes after the push's snapshot.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>