Best strategies for AI agents to recover gracefully from tool call failures mid-task?