fix: launch tmux detached, prompt user to attach with ! prefix
This commit is contained in:
@@ -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 <project_root> "$LOOP_CMD"
|
||||
tmux kill-session -t agent-loop 2>/dev/null; tmux new-session -d -s agent-loop -c <project_root> "$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.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user