Consecutive failure detection
The post_tool_failure.sh hook now tracks recent failures and warns the AI when the same tool fails 2+ times within 5 minutes, with a suggested alternative:
- Grep/Glob →
find+grep -rvia Bash - Read →
lsto verify path first - Browser MCP tools → alternative browser tool or
curl
This directly addresses the #1 error pattern from the first evolution report: ripgrep binary failures caused 77 redundant Grep/Glob calls because the AI had no signal to stop retrying.
Migration from v1.3.0
Just copy the updated script:
cp hooks/post_tool_failure.sh ~/.claude/hooks/
chmod +x ~/.claude/hooks/post_tool_failure.shFull changelog: CHANGELOG.md