  A search for direct pair production of top squarks in final states with two
tau leptons, $b$-jets, and missing transverse momentum is presented. The
analysis is based on proton-proton collision data at $\sqrt{s} = 13$ TeV
corresponding to an integrated luminosity of 36.1 fb$^{-1}$ recorded with the
ATLAS detector at the Large Hadron Collider in 2015 and 2016. Two exclusive
channels with either two hadronically decaying tau leptons or one hadronically
and one leptonically decaying tau lepton are considered. No significant
deviation from the Standard Model predictions is observed in the data. The
analysis results are interpreted in terms of model-independent limits and used
to derive exclusion limits on the masses of the top squark $\tilde t_1$ and the
tau slepton $\tilde \tau_1$ in a simplified model of supersymmetry with a
nearly massless gravitino. In this model, masses up to $m(\tilde t_1) = 1.16$
TeV and $m(\tilde \tau_1) = 1.00$ TeV are excluded at 95% confidence level.
