The paper is devoted to the compactness of the commutators \(aS_\Gamma - S_\Gamma aI\) and \(W_\alpha S_\Gamma - S_\Gamma W_\alpha\), where \(S_\Gamma\) is the Cauchy singular integral operator, \(a\) is a bounded measurable function, \(W_\alpha\) is the shift operator given by \(W_\alpha f = f\circ\alpha\), and \(\alpha\) is a bi-Lipschitz homeomorphism (shift). The cases of the unit circle and the unit interval are considered. We prove that these commutators are compact on rearrangement-invariant spaces with nontrivial Boyd indices if and only if the function a or, respectively, the derivative of the shift a has vanishing mean oscillation.