Automatic Error Recovery
When a step fails, Iter generates a context-aware fix prompt with the full error output, pipeline state, and run history. Fix steps are injected into the step tree and the original is re-verified.
How auto-fix works
Step fails
A command returns a non-zero exit code, or a file operation encounters an error.
Fix prompt generated
Iter builds a fix prompt with the error output, step tree state, previous run history, and relevant file contents.
Fix steps injected
The LLM generates fix steps (commands and files) which are injected as children of the failed step.
Re-verification
After fix steps succeed, verify steps are reset to pending and re-run to confirm the fix actually worked.
Step tree mechanics
✓ Step 1: npm init -y
✓ Step 2: Create src/index.ts
✗ Step 3: npm run build ← failed
✓ Fix 3.1: Update tsconfig.json ← fix child
✓ Fix 3.2: Add missing import ← fix child
⟳ Step 3: npm run build ← re-verified
✓ Step 4: npm test Verify steps
Reset to pending after fixes succeed - the check re-runs to confirm the fix worked.
Command/file steps
Marked skipped - the fix children replace the original action entirely.
Safety limits
Max fix attempts per step
Max fix nesting depth
Max review-fix cycles