feat(@scripts): ✨ add detached tmux session support
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
d682cc61f4
commit
d145983188
1 changed files with 10 additions and 0 deletions
10
bin/rclaude
10
bin/rclaude
|
|
@ -1599,6 +1599,16 @@ fi
|
|||
setup_host "$host"
|
||||
sync_tmux_conf "$host"
|
||||
inner=$(build_inner "$dir")
|
||||
# RCLAUDE_DETACHED=1 → spawn the tmux session on the remote in the
|
||||
# background and print the session name. Symmetric with the local-host
|
||||
# detached branch above; used by supervisor processes (e.g. clare web)
|
||||
# that bring up a remote Claude pane without attaching the calling tty.
|
||||
# Mosh is interactive-only — always go through ssh for detached spawn.
|
||||
if [ -n "${RCLAUDE_DETACHED:-}" ]; then
|
||||
ssh $_SSH_LIVE_OPTS "$host" "tmux new-session -d -s '${session}' \"${inner}\""
|
||||
printf '%s\n' "$session"
|
||||
exit 0
|
||||
fi
|
||||
# `new-session -A` attaches if a session of that name already exists, so
|
||||
# re-running rclaude after a broken pipe lands you back in the same tmux
|
||||
# session instead of erroring with "duplicate session". Combined with
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue