We derive a posteriori estimates for a discretization in space of the standardCahn–Hilliard equation with a double obstacle free energy.The derived estimates are robust and efficient, and in practice are combinedwith a heuristic time step adaptation. We present numerical experiments in two and three space dimensions and compareour method with an existing heuristic spatial mesh adaptation algorithm.