From 977695a1a8c8c574ffbe5dc509092799224f4076 Mon Sep 17 00:00:00 2001 From: Natalie Date: Mon, 18 May 2026 19:38:35 -0700 Subject: [PATCH] =?UTF-8?q?feat(session):=20=E2=9C=A8=20add=20detached=20s?= =?UTF-8?q?ession=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- bin/rclaude | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/rclaude b/bin/rclaude index 6e0cae0..18e916a 100755 --- a/bin/rclaude +++ b/bin/rclaude @@ -1522,6 +1522,15 @@ if is_local "$host"; then exit 1 fi sync_tmux_conf local + # RCLAUDE_DETACHED=1 → spawn the tmux session in the background and + # return the session name on stdout. Used by supervisor processes + # (e.g. `clare web`) that want to bring up a Claude session without + # attaching the current terminal. + if [ -n "${RCLAUDE_DETACHED:-}" ]; then + tmux new-session -d -s "$session" "$(build_inner "$dir")" + printf '%s\n' "$session" + exit 0 + fi exec tmux new-session -s "$session" "$(build_inner "$dir")" fi