Skip to content

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 = false
max_retries = 3
OptionDefaultDescription
enabledtrueActivate the auto-debug retry loop; explicit false disables
max_retries3Maximum re-attempt cycles per error episode (max: 10)

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

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.