diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 6554029..dc8e898 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -10,7 +10,7 @@ "name": "agent-loop", "source": "./", "description": "Autonomous generator-evaluator agent loop for long-running coding tasks. Plan interactively, then execute with full visibility.", - "version": "0.10.2", + "version": "0.11.0", "author": { "name": "Sheldon" }, diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index fc2dfce..07a0ffd 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "agent-loop", - "version": "0.10.2", + "version": "0.11.0", "description": "Autonomous generator-evaluator agent loop for long-running coding tasks. Run /agent-loop:run to start.", "author": { "name": "Sheldon" diff --git a/skills/run/SKILL.md b/skills/run/SKILL.md index 6bfb9bc..90141f6 100644 --- a/skills/run/SKILL.md +++ b/skills/run/SKILL.md @@ -161,33 +161,37 @@ Agent( 4. Parse arguments for any flags to pass through (e.g., `--skip-eval`). -5. Build the loop.sh command with any flags: +5. Build the loop.sh command and derive a unique tmux session name: ```bash LOOP_CMD=".loop/loop.sh" # Add --skip-eval if requested # Add --max N if specified + +# Derive tmux session name from project directory name. +# This allows multiple loops to run in parallel on different projects. +SESSION_NAME="agent-loop-$(basename "$(pwd)")" ``` -6. Kill any existing agent-loop tmux session, then launch detached: +6. Kill any existing tmux session for THIS project, then launch detached: ```bash -tmux kill-session -t agent-loop 2>/dev/null; tmux new-session -d -s agent-loop -c "$LOOP_CMD" +tmux kill-session -t "$SESSION_NAME" 2>/dev/null; tmux new-session -d -s "$SESSION_NAME" -c "$LOOP_CMD" ``` 7. Start a **background watcher** that waits for the loop to finish. Use the Bash tool with `run_in_background: true`: ```bash -while tmux has-session -t agent-loop 2>/dev/null; do sleep 10; done; echo "LOOP_COMPLETE" +while tmux has-session -t "$SESSION_NAME" 2>/dev/null; do sleep 10; done; echo "LOOP_COMPLETE" ``` This runs silently. When the tmux session exits, Claude Code gets notified automatically. 8. Tell the user: -> **Loop launched.** Watch it live: +> **Loop launched** as tmux session `{SESSION_NAME}`. Watch it live: > ``` -> ! tmux attach -t agent-loop +> ! tmux attach -t {SESSION_NAME} > ``` > (Type the above — it opens the session right here in your terminal.) > @@ -223,10 +227,11 @@ When you receive the background task notification (the watcher prints "LOOP_COMP If the user asks about progress (e.g., "status", "how's it going"): 1. Read `.loop/prd.json` — count passed/failed/blocked -2. Capture recent tmux output: +2. Derive the session name and capture recent tmux output: ```bash -tmux capture-pane -t agent-loop -p | tail -20 +SESSION_NAME="agent-loop-$(basename "$(pwd)")" +tmux capture-pane -t "$SESSION_NAME" -p | tail -20 ``` 3. Report current status.