feat: 'claudebox tmux <box> [session]' — a shell that survives you #49

Merged
dan-claude-bot merged 1 commit from feat/tmux-verb into main 2026-07-14 13:23:58 +00:00
dan-claude-bot commented 2026-07-14 13:11:01 +00:00 (Migrated from github.com)

Closes #6, as reworded: a new verb, not a changed shell default.

claudebox tmux work            # attach or create session 'main'
claudebox tmux work run-1      # a second, independent stream in the same box

Runs tmux new-session -A -s <session> inside the box as the claude user. -A is the contract: attach if it exists, create if not — so starting work and resuming after a dropped SSH connection are the same command, with no state to remember. The long-Claude-run-dies-on-SIGHUP failure this issue was filed over stops being possible for anything started under it.

Per the issue's implementer notes:

  • One CMDS row + one function — the verb goes through the same table, resolve_box() tag boundary, and generated help as every other verb.
  • Session names are validated to [A-Za-z0-9_-] before reaching tmux -s.
  • shell is untouched: two verbs, two contracts (shell = a plain shell, tmux = a session that survives you), so nested-tmux prefix conflicts and exit-vs-detach are opt-in costs.
  • Nothing Claude-specific — after #17 this is box tmux with only the rename.

Help prose (claudebox help tmux) and the README command table carry the detach hint (Ctrl-b d) and the parallel-sessions example.

🤖 Generated with Claude Code

Closes #6, as reworded: a **new verb**, not a changed `shell` default. ```sh claudebox tmux work # attach or create session 'main' claudebox tmux work run-1 # a second, independent stream in the same box ``` Runs `tmux new-session -A -s <session>` inside the box as the claude user. `-A` is the contract: attach if it exists, create if not — so starting work and resuming after a dropped SSH connection are the *same command*, with no state to remember. The long-Claude-run-dies-on-SIGHUP failure this issue was filed over stops being possible for anything started under it. Per the issue's implementer notes: - One CMDS row + one function — the verb goes through the same table, `resolve_box()` tag boundary, and generated help as every other verb. - Session names are validated to `[A-Za-z0-9_-]` before reaching `tmux -s`. - `shell` is untouched: two verbs, two contracts (`shell` = a plain shell, `tmux` = a session that survives you), so nested-tmux prefix conflicts and exit-vs-detach are opt-in costs. - Nothing Claude-specific — after #17 this is `box tmux` with only the rename. Help prose (`claudebox help tmux`) and the README command table carry the detach hint (`Ctrl-b d`) and the parallel-sessions example. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: heavy-duty/box#49
No description provided.