We study shear banding flows in models of wormlike micelles or polymer solutions, and explore the effects of different boundary conditions for the viscoelastic stress. These are needed because the equations of motion are inherently non-local and include “diffusive” or square-gradient terms. Using the diffusive Johnson–Segalman model and a variant of the Rolie-Poly model for entangled micelles or polymer solutions, we study the interplay between different boundary conditions and the intrinsic stress gradient imposed by the flow geometry. We consider prescribed gradient (Neumann) or value (Dirichlet) of the viscoelastic stress tensor at the boundary, as well as mixed boundary conditions in which an anchoring strength competes with the gradient contribution to the stress dynamics. We find that hysteresis during shear rate sweeps is suppressed if the boundary conditions favor the state that is induced by the sweep. For example, if the boundaries favor the high shear rate phase then hysteresis is suppressed at the low shear rate edges of the stress plateau. If the boundaries favor the low shear rate state, then the high shear rate band can lie in the center of the flow cell, leading to a three-band configuration. Sufficiently strong stress gradients due to curved flow geometries, such as that of cylindrical Couette flow, can convert this to a two-band state by forcing the high shear rate phase against the wall of higher stress, and can suppress the hysteresis loop observed during a shear rate sweep.