Fix idle detection for long-running computations