I think we should store the result of this task in memory so subsequent calls to this operation will not have to go through the process of executing another task just for the sake of testing whether the plugin exists or not. Better yet we could optimize this suggested optimization further by calling a single task once after we restarted the worker (and before we set its state to started) to the plugin installer to query all registered plugins on this specific worker and store them all on the worker only once. (both for management workers and agent workers)