Merge "Waiting for the state to settle after clear-all-tasks action" into main