  Onsager's conjecture, which relates the conservation of energy to the
regularity of weak solutions of the Euler equations, was completely resolved in
recent years. In this work, we pursue an analogue of Onsager's conjecture in
the context of the hydrostatic Euler equations (also known as the inviscid
primitive equations of oceanic and atmospheric dynamics). In this case the
relevant conserved quantity is the horizontal kinetic energy.
  We first consider the standard notion of weak solution which is commonly used
in the literature. We show that if the horizontal velocity $(u,v)$ is
sufficiently regular then the horizontal kinetic energy is conserved.
Interestingly, the spatial H\"older regularity exponent which is sufficient for
energy conservation in the context of the hydrostatic Euler equations is
$\frac{1}{2}$ and hence larger than the corresponding regularity exponent for
the Euler equations (which is $\frac{1}{3}$).
  This is due to the anisotropic regularity of the velocity field: Unlike the
Euler equations, in the case of the hydrostatic Euler equations the vertical
velocity $w$ is one degree spatially less regular with respect to the
horizontal variables, compared to the horizontal velocity $(u,v)$. Since the
standard notion of weak solution is not able to deal with this anisotropy
properly, we introduce two new notions of weak solutions for which the vertical
part of the nonlinearity is interpreted as a paraproduct. We finally prove
several sufficient conditions for such weak solutions to conserve energy.
