| name | error-recovery-patterns |
| description | Document common error types, provide recovery strategies, retry patterns with limits, and fallback strategies. Use when encountering compilation errors, test failures, tool failures, or other execution errors. Provides systematic approach to error handling and recovery. |
Error Recovery Patterns
Overview
Systematic approach to handling and recovering from common errors during task execution. Provides recovery strategies, retry patterns, and fallback approaches for different error types.
Common Error Types
1. Compilation Errors
Symptoms:
- TypeScript compilation fails
- Syntax errors (missing braces, semicolons)
- Type mismatches
- Import path errors
- Method name mismatches
Recovery Strategy:
- Read error message carefully: Understand what's wrong
- Fix syntax/type errors immediately: Don't proceed with broken code
- Re-run compilation check:
npx tsc --noEmit
- If errors persist: Check for missing imports or type definitions
Common Patterns:
- Syntax errors: Check for missing/extra braces, parentheses, semicolons
- Type mismatches: Verify interface compatibility, check actual types
- Import errors: Use relative paths, check file existence
- Method name mismatches: Check actual method names in source code
When to skip: Never skip compilation errors - must fix before proceeding
2. Test Failures
Symptoms:
- Tests fail with assertion errors