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>