Skip to content

Commit cd9d12d

Browse files
la14-1louisgvclaude
authored
fix(qa): add shutdown timeout and e2e-tester responsiveness to prevent infinite loop (#3134)
When the e2e-tester finishes work and goes idle without responding to shutdown_request, the team lead retries indefinitely burning the entire 85-min budget in a shutdown loop. Three fixes: 1. e2e-tester protocol: add explicit instruction to respond to shutdown_request immediately after reporting results 2. Step 4 shutdown sequence: add 60s timeout — if a teammate doesn't respond, proceed with TeamDelete anyway 3. Fix stale timeout reference (25/29/30 → 75/83/85 min) Fixes #3093 Agent: issue-fixer Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 1599444 commit cd9d12d

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.claude/skills/setup-agent-team/qa-quality-prompt.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ cd REPO_ROOT_PLACEHOLDER && git worktree remove WORKTREE_BASE_PLACEHOLDER/TASK_N
166166
9. If changes were made: commit, push, open a PR (NOT draft) with title "fix(e2e): [description]"
167167
10. Clean up worktree when done
168168
11. Report: clouds tested, clouds skipped, agents passed, agents failed, fixed
169-
12. **SIGN-OFF**: `-- qa/e2e-tester`
169+
12. **SHUTDOWN RESPONSIVENESS**: After reporting results, remain actively responsive. If you receive a `shutdown_request` message at any point, immediately respond with `{"type":"shutdown_response","request_id":"<id>","approve":true}` — do NOT go idle without responding to a pending shutdown request.
170+
13. **SIGN-OFF**: `-- qa/e2e-tester`
170171

171172
### Teammate 5: record-keeper (model=sonnet)
172173

@@ -245,7 +246,7 @@ Use the Task tool to spawn all 5 teammates in parallel:
245246

246247
Keep looping until:
247248
- All tasks are completed OR
248-
- Time budget is reached (see timeout warnings at 25/29/30 min)
249+
- Time budget is reached (see timeout warnings at 75/83/85 min)
249250

250251
## Step 4 — Summary
251252

@@ -277,7 +278,13 @@ After all teammates finish, compile a summary:
277278
- PRs: [links if any, or "none — no updates needed"]
278279
```
279280

280-
Then shutdown all teammates and exit.
281+
Then shutdown all teammates and exit:
282+
283+
1. Send `shutdown_request` to each teammate via `SendMessage`.
284+
2. Wait up to 60 seconds for `shutdown_response` from each teammate.
285+
3. **If any teammate does NOT respond within 60 seconds, consider them shut down and proceed anyway.** Do NOT retry `shutdown_request` — the teammate has completed their work and gone idle.
286+
4. Call `TeamDelete` once all teammates have responded OR 60 seconds have elapsed.
287+
5. **After `TeamDelete`, output the summary as plain text with NO further tool calls.** Any tool call after `TeamDelete` causes an infinite shutdown prompt loop in non-interactive mode.
281288

282289
## Team Coordination
283290

0 commit comments

Comments
 (0)