  Recent Josephson tunneling experiments on twisted flakes of high-$T_c$
cuprate superconductor Bi$_2$Sr$_2$CaCu$_2$O$_{8+x}$ revealed a non-reciprocal
behavior of the critical interlayer Josephson current - i.e., a Josephson diode
effect. Motivated by these findings we study theoretically the emergence of the
Josephson diode effect in twisted interfaces between nodal superconductors, and
highlight a strong dependence on the twist angle $\theta$ and damping of the
junction. In all cases, the theory predicts diode efficiency that vanishes
exactly at $\theta = 45^\circ$ and has a strong peak at a twist angle close to
$\theta = 45^\circ$, consistent with experimental observations. Near
$45^\circ$, the junction breaks time-reversal symmetry ${\cal T}$
spontaneously. We find that for underdamped junctions showing hysteretic
behavior, this results in a \emph{dynamical} Josephson diode effect in a part
of the ${\cal T}$-broken phase. The direction of the diode is trainable in this
case by sweeping the external current bias. This effect provides a sensitive
probe of spontaneous ${\cal T}$-breaking. We then show that explicit ${\cal
T}$-breaking perturbations with the symmetry of a magnetic field perpendicular
to the junction plane lead to a {\em thermodynamic} diode effect that survives
even in the overdamped limit. We discuss an experimental protocol to probe the
double-well structure in the Josephson free energy that underlies the tendency
towards spontaneous ${\cal T}$-breaking even if ${\cal T}$ is broken
explicitly. Finally, we show that in-plane magnetic fields can control the
diode effect in the short junction limit, and predict the signatures of
explicit ${\cal T}$-breaking in Shapiro steps.
