Return first match found in completed or pending tasks