diff --git a/skills/run/SKILL.md b/skills/run/SKILL.md index 9d53336..f625a8e 100644 --- a/skills/run/SKILL.md +++ b/skills/run/SKILL.md @@ -107,24 +107,21 @@ LOOP_CMD=".loop/loop.sh" # Add --max N if specified ``` -6. Tell the user what's about to happen: - -> **Launching loop in tmux...** -> - Stories: {total} to complete -> - Mode: {mode} -> -> The tmux session will open now. You'll see the loop running live. -> - **Detach** (return to Claude Code): `Ctrl+B` then `D` -> - **Stop the loop**: `Ctrl+C` in the tmux session -> - **Reattach later**: `tmux attach -t agent-loop` - -7. Launch tmux **attached** so the user sees it immediately: +6. Kill any existing agent-loop tmux session, then launch detached: ```bash -tmux new-session -s agent-loop -c "$LOOP_CMD" +tmux kill-session -t agent-loop 2>/dev/null; tmux new-session -d -s agent-loop -c "$LOOP_CMD" ``` -**IMPORTANT:** Do NOT use the `-d` flag. The session must attach so the user can watch it live. The bash command will block until the user detaches (`Ctrl+B D`) or the loop finishes. +7. Tell the user to attach: + +> **Loop running in tmux.** To watch it live, run: +> ``` +> ! tmux attach -t agent-loop +> ``` +> - **Detach** (return to Claude Code): `Ctrl+B` then `D` +> - **Stop the loop**: `Ctrl+C` in the tmux session +> - Ask me "status" anytime and I'll check progress for you. ---