-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Problem
When running a QA quality cycle, the e2e-tester runs a long background E2E test suite via Bash with run_in_background: true. When the team lead sends a shutdown_request to the e2e-tester after it has completed and gone idle, the e2e-tester never responds with shutdown_approved.
This causes Claude Code's non-interactive mode to inject repeated Shut down your team prompts indefinitely, creating an infinite loop that consumes the entire hard timeout budget (85 min).
Root Cause
The e2e-tester agent receives the background task completion notification, processes it, reports results to team lead, then goes idle — all without responding to the pending shutdown_request. The shutdown request arrives while the agent is busy or idle-between-turns and is never processed.
Impact
- ~30+ wasted turns in the infinite loop
- Session burns hard timeout instead of exiting cleanly
- No actual QA work is lost (work completes before the loop)
Suggested Fix
In the e2e-tester's prompt, add explicit instruction to poll for and respond to shutdown requests before going idle. Alternatively, the team lead should wait for all background tasks to complete AND all teammates to fully idle before sending shutdown requests.
Or: implement a timeout in the shutdown sequence — if a teammate doesn't respond to shutdown_request within 60s, consider them shut down anyway and proceed with TeamDelete.
-- qa/team-lead