tools / fallback_chains.py
Suggest alternative tools when a tool fails so the agent doesn't waste a turn.
Chains
| Failed tool | Fallback chain |
|---|---|
deep_research | web_search → recall |
web_search | deep_research → recall |
execute | file_system |
postgres_admin | execute |
vision_analysis | file_system |
delegate_to_swarm | execute |
API
get_fallback_hint(failed_tool, error_text) -> Optional[str]— Skip CAPTCHA failures forweb_search, docker errors forexecute.get_fallback_tool_name(failed_tool) -> Optional[str]— Returns the first fallback in the chain.