Skip to content

Add persistent terminal sessions - #553

Draft
dhalf wants to merge 1 commit into
mainfrom
feature/persistent-terminal-sessions
Draft

dhalf wants to merge 1 commit into
mainfrom
feature/persistent-terminal-sessions

Conversation

@dhalf

@dhalf dhalf commented Oct 7, 2026

Copy link
Copy Markdown

Summary

  • add --session direct|tmux|zellij, --session-name, and --session-title for long-running interactive shell, claude, claude-agents, codex, and grok launches
  • derive stable default session names/titles from the instance and launch kind, with --session-name creating parallel sessions
  • wrap interactive commands through attach-or-create tmux/Zellij renderers while preserving existing direct SSH behavior and shell escaping
  • install tmux in base images; document that Zellij wrapping is supported when the image/profile supplies zellij

Notes

  • Session wrapping is rejected for non-interactive shell -- ... and short-lived agent invocations such as auth/help/version commands.
  • tmux works out of the box after an image rebuild or reprovision. Zellij is not added through an unofficial package source.

Testing

  • cargo fmt -- --check
  • cargo check --lib
  • cargo clippy --lib -- -D warnings
  • cargo test ssh::tests --lib
  • cargo test terminal_session::tests --lib
  • cargo test commands::lifecycle::tests::agent_session_detection_rejects_short_commands_only_in_leading_position --lib
  • cargo test tests::claude_session_flags_parse --lib
  • cargo test tests::invalid_session_name_rejected_by_parser --lib

Not run

  • Lima and Firecracker VM integration suites. This environment has no Lima or /dev/kvm, and no remote Firecracker host was configured.
  • Full cargo test --lib: many existing tests fail in this workspace because private-storage tests reject writable /tmp ancestors; targeted tests and cargo check/clippy pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant