So the cosine half-angle formula says:
Now, we know that co-terminal angles have equal cosines. Consider that $\cos (7\pi/4)$ = $\cos(-\pi/4)$. However, if you apply the half angle formula to $(7\pi/4)$ you get a different answer than if you apply the half angle formula to $(-\pi/4)$. Does the half angle formula require that your angle being inputted be positive, so that applying the half-angle formula to $(-\pi/4)$ would mean plugging in the positive coterminal version, $(7\pi/4)$, to the formula? (In which case the contradiction disappears)

For any angle $\theta$, we have$$\frac{1+\cos\theta}2=\frac{1+\cos\left(2\frac\theta2\right)}2=\frac{1+\cos^2\left(\frac\theta2\right)-\sin^2\left(\frac\theta2\right)}2=\cos^2\left(\frac\theta2\right),$$since $1-\sin^2\left(\frac\theta2\right)=\cos^2\left(\frac\theta2\right).$ So, yes, that formula is always valid.