Shimura varieties admit vector bundles with liftings of the Hecke correspondences (automorphic vector bundles). These vector bundles have a natural extension to $p$-integral models of good reduction of Shimura varieties. The topic of these lectures is the determination of the optimal power of $p$ by which one has to multiply the Hecke correspondences in the generic fiber to obtain integral cohomological correspondences. It turns out that this topic involves many aspects of Shimura varieties of a foundational nature. Joint work with X. He and U. G\"ortz.