Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .claude/skills/setup-agent-team/refactor-issue-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Track lifecycle: "pending-review" → "under-review" → "in-progress". Check la
7. Keep pushing commits to the same branch as work progresses
8. When fix is complete and tests pass: `gh pr ready NUMBER`, post update comment linking PR
9. Do NOT close the issue — `Fixes #SPAWN_ISSUE_PLACEHOLDER` auto-closes on merge
10. Clean up: `git worktree remove WORKTREE_BASE_PLACEHOLDER`, shutdown teammates
10. Clean up: run `git worktree remove WORKTREE_BASE_PLACEHOLDER` and call `TeamDelete` in ONE turn, then output a plain-text summary with **NO further tool calls**. A text-only response ends the non-interactive session immediately.

## Commit Markers

Expand All @@ -84,5 +84,6 @@ Every commit: `Agent: issue-fixer` + `Co-Authored-By: Claude Sonnet 4.5 <noreply

- Run tests after every change
- If fix is not straightforward (>10 min), comment on issue explaining complexity and exit
- **NO TOOLS AFTER TeamDelete.** After calling `TeamDelete`, do NOT call any other tool. Output plain text only to end the session. Any tool call after `TeamDelete` causes an infinite shutdown prompt loop in non-interactive (-p) mode. See issue #3103.

Begin now. Fix issue #SPAWN_ISSUE_PLACEHOLDER.
8 changes: 6 additions & 2 deletions .claude/skills/setup-agent-team/refactor-team-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ Setup: `mkdir -p WORKTREE_BASE_PLACEHOLDER`. Cleanup: `git worktree prune` at cy

**The session ENDS when you produce a response with NO tool calls.** EVERY iteration MUST include at minimum: `TaskList` + `Bash("sleep 15")`.

**EXCEPTION — After TeamDelete:** Once `TeamDelete` has been called and completed (step 4 of the shutdown sequence), your VERY NEXT response MUST be plain text only with **NO tool calls**. Do NOT call `TaskList`, `Bash`, or any other tool after `TeamDelete`. A text-only response is the termination signal for the non-interactive harness. Any tool call after `TeamDelete` causes an infinite loop of shutdown prompt injections.

Keep looping until:
- All tasks are completed OR
- Time budget is reached (10 min warn, 12 min shutdown, 15 min force)
Expand All @@ -289,11 +291,13 @@ Follow this exact shutdown sequence:
1. At 10 min: broadcast "wrap up" to all teammates
2. At 12 min: send `shutdown_request` to EACH teammate by name
3. Wait for ALL shutdown confirmations — keep calling `TaskList` while waiting
4. After all confirmations: `git worktree prune && rm -rf WORKTREE_BASE_PLACEHOLDER`
5. Print summary and exit
4. In ONE turn: call `TeamDelete`, then run `git worktree prune && rm -rf WORKTREE_BASE_PLACEHOLDER` — do everything in this single turn
5. **Output a plain-text summary and STOP** — do NOT call any tool after `TeamDelete`. This text-only response ends the session.

**NEVER exit without shutting down all teammates first.** If a teammate doesn't respond to shutdown_request within 2 minutes, send it again.

**CRITICAL — NO TOOLS AFTER TeamDelete.** After `TeamDelete` returns (whether success or "No team name found"), you MUST NOT make any further tool calls. Output your final summary as plain text and stop. Any tool call after `TeamDelete` triggers an infinite shutdown prompt loop in non-interactive (-p) mode. See issue #3103.

## Safety

- **NEVER close a PR.** No teammate, including team-lead and pr-maintainer, may close any PR — not even PRs created by refactor teammates. Closing PRs is the **security team's responsibility exclusively**. The only exception is if you are immediately opening a superseding PR (state the replacement PR number in the close comment). If a PR is stale, broken, or should not be merged, **leave it open** and comment explaining the issue — the security team will close it during review.
Expand Down
Loading