Add 'claudebox tmux <box> [session]' — attach-or-create a named tmux session in the box #6
Labels
No labels
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-triage
ready
release
scope:cli
scope:drill
scope:host
scope:installer
scope:templates
scope:tiers
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/box#6
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
claudebox shellis a bareincus exec ... sudo -u claude -i. The shell is a child of the exec connection: if the operator's terminal or SSH session drops, everything running in it gets SIGHUP'd — a long Claude run dies. tmux is already installed and configured in the box, but using it relies on remembering to start it, and it's easy to forget (this has already cost one long run).Proposal
Do not change
shell— it stays bare and predictable (exitmeans exit, no nesting surprises). Add a sibling verb whose whole job is persistence:which runs, inside the box:
-Ais the contract: attach if the session exists, create it if not. So starting work and reattaching after a disconnect are the same command —claudebox tmux incubator— with no state to remember.The optional session name buys parallel long-running streams per box:
Drop your SSH connection, come back, type the same command, and the run is still going.
Why a verb instead of changing
shellThe original version of this issue proposed making
shellattach tmux by default, and carried a cons list for it: nested-tmux prefix conflicts when the host terminal is itself in tmux, tmux owning scrollback/copy-paste,exit-vs-detach muscle-memory mismatch. As a separate opt-in verb, every one of those costs is only paid by someone who asked for tmux — andshellkeeps being the escape hatch when tmux semantics are in the way. Two verbs, two contracts:shell= a plain shell,tmux= a session that survives you.Notes for the implementer
resolve_box(), untagged instances refused.tmux -s.claudebox info <box>(or the verb itself with no session and none existing) could list live sessions viatmux ls— nice-to-have, not required.box tmux <box> [session]— nothing Claude-specific in it.🤖 Generated with Claude Code