Switch the task add operation to find_or_add to allow engines to implement it atomically