Auto-Debug
Auto-Debug detects build/test failure output in tool results and automatically re-injects the error so the agent can fix-and-retry, up to a configurable limit.
Auto-debug is enabled by default when [options.auto_debug] or enabled is
omitted. Set enabled = false to disable the retry loop explicitly:
[options.auto_debug]enabled = falsemax_retries = 3Options
Section titled “Options”| Option | Default | Description |
|---|---|---|
enabled | true | Activate the auto-debug retry loop; explicit false disables |
max_retries | 3 | Maximum re-attempt cycles per error episode (max: 10) |
How it works
Section titled “How it works”When a bash or execution tool call returns a non-zero exit code, Auto-Debug captures the error output and re-injects it into the agent context with a prompt to fix the issue. The agent gets up to max_retries attempts before the loop stops.
This is most useful for:
- Compilation errors after code edits
- Test failures after adding features
- Lint errors in CI-like workflows
Relation to Reflection Loop
Section titled “Relation to Reflection Loop”Auto-Debug triggers on any tool error. The Reflection Loop is more targeted — it runs a specific test command after each write/edit and re-injects on failure. Use Reflection Loop when you want test-driven iteration; use Auto-Debug for general error recovery.