[Feature Request] Implement Thrashing Detection and Auto-Intervention
Bug Description Implement Thrashing Detection and Auto-Intervention
Priority: CRITICAL
Problem: Claude Code can get stuck in trial-and-error loops, trying variations of the same failing approach without stopping to research or ask for help. Example from real session: Hit "EAS CLI couldn't find credentials" error 10+ times, tried different environment variable combinations, created 5 different expect scripts, never stepped back to research the root cause.
Current Behavior:
Same error appears multiple times AI tries slight variations without hypothesis User watches 794 lines of transcript with minimal progress No self-awareness that approach isn't working Expected Behavior:
After same error appears 3 times, automatically pause Prompt: "I'm stuck in a loop with [error]. Let me research the root cause before trying more approaches." Force a research/analysis phase Ask user for guidance before continuing Impact:
Wastes hours of user time Creates frustration and loss of trust Makes complex debugging tasks nearly unusable Suggested Implementation:
Track error messages across tool calls in a session When same error signature appears 3+ times, trigger intervention Require AI to articulate hypothesis before next attempt Surface this to user: "I notice I'm repeating attempts. Should I step back and research?"
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/4277
- https://github.com/anthropics/claude-code/issues/12775
- https://github.com/anthropics/claude-code/issues/12769
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.