agent-zero/plugins/_error_retry
frdel e138e33ca9 Add file-level DOX docs & update AGENTS indexes
Add comprehensive file-level DOX documentation across the repo and update directory AGENTS.md indexes. Many new `*.py.dox.md` files were added under api, helpers, tools, plugins, extensions, webui, and other dirs to document endpoint purpose, ownership, runtime contracts, work guidance, and verification. Several AGENTS.md files were created or updated (agents profiles, api, docker, extensions, helpers, plugins, skills, webui components, etc.) to list child DOX files and clarify documentation/work guidance. Also add example and bundled profile DOX files (agent0, default, developer, hacker, researcher) and minor updates to helpers/dirty_json.py and its tests. These changes improve on-disk documentation coverage and establish the convention that each direct runtime file should have a matching `*.dox.md` describing its contracts and verification steps.
2026-06-08 12:41:53 +02:00
..
extensions/python/_functions/agent/Agent Make error retry count configurable 2026-05-18 03:23:56 +02:00
webui Make error retry count configurable 2026-05-18 03:23:56 +02:00
AGENTS.md Add file-level DOX docs & update AGENTS indexes 2026-06-08 12:41:53 +02:00
default_config.yaml refactor: consolidate module loading utilities and add plugin lifecycle improvements 2026-03-23 21:13:25 +01:00
plugin.yaml refactor - plugin names and builtin plugins 2026-03-10 22:20:53 +01:00
README.md Make error retry count configurable 2026-05-18 03:23:56 +02:00

Error Retry

Retry after an unexpected critical exception so the agent has a chance to recover instead of failing immediately.

What It Does

This plugin hooks into the agent lifecycle and automatically retries the current loop when an unhandled critical exception occurs.

It does not retry exceptions that are already treated as controlled agent flow, such as:

  • HandledException
  • RepairableException

Main Behavior

  • Counter reset per monologue
    • Clears the retry counter at the start of a new monologue.
  • Critical exception retry
    • On an unexpected exception, logs a warning, waits briefly, injects an agent-facing critical error message into history, and suppresses the original exception while retries remain.
  • Configurable retry count
    • Uses the plugin's retries setting to control how many times recovery is attempted per monologue. The default is 1.

Key Files

  • extensions/python/_functions/agent/Agent/monologue/start/_10_reset_critical_exception_counter.py
  • extensions/python/_functions/agent/Agent/handle_exception/end/_80_retry_critical_exception.py

Configuration Scope

  • Settings section: agent
  • Per-project config: true
  • Per-agent config: true
  • Always enabled: false

Plugin Metadata

  • Name: _error_retry
  • Title: Error Retry
  • Description: Retry on critical exceptions before failing.