From eacb1a9e2841f2afd2c698ea733e214400b23521 Mon Sep 17 00:00:00 2001 From: claude-hdb Date: Tue, 14 Jul 2026 13:10:59 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20'claudebox=20tmux=20=20[session]'?= =?UTF-8?q?=20=E2=80=94=20a=20shell=20that=20survives=20you?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 'shell' is a child of the exec connection: drop the terminal and a long Claude run inside it is SIGHUP'd — which has already cost one run. tmux is installed in every box but relying on remembering to start it is how that run was lost. New verb, not a changed default: 'tmux new-session -A -s ' attaches when the session exists and creates it when it doesn't, so starting work and reattaching after a disconnect are the same command. The session name (default: main) gives parallel streams in one box. 'shell' stays bare on purpose — two verbs, two contracts — so tmux's costs (nesting, scrollback semantics, exit-vs-detach) are only paid when asked for. Closes #6 --- README.md | 1 + bin/claudebox | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/README.md b/README.md index e56ba59..3cd5e69 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ claudebox list # list your boxes claudebox info # one box: state, IP, snapshot labels claudebox shell # enter as the claude user claudebox exec -- # run a command in the box +claudebox tmux [session] # attach/create a tmux session — survives disconnects claudebox snapshot [label] # checkpoint (label defaults to manual-) claudebox restore # roll back to a snapshot claudebox rename # rename a box (stop it first) diff --git a/bin/claudebox b/bin/claudebox index de9a320..1013551 100755 --- a/bin/claudebox +++ b/bin/claudebox @@ -42,6 +42,7 @@ CMDS=( "info^ [--json]^box^One box: state, type, IP, and its snapshot labels^fn:cmd_info^" "shell^^box^Open a shell in a box, as the claude user^fn:cmd_shell^" "exec^ -- ^box^Run a command inside a box^fn:cmd_exec^" + "tmux^ []^box^Attach or create a tmux session in a box — survives disconnects^fn:cmd_tmux^" "snapshot^ [