Aldehydes are common intermediates in enzymatic pathways, but their high reactivity can make them difficult to observe. Here, the authors study the mechanism of aldehyde deactivation in a dehydrogenase, showing a key E/Zisomerization and observing a thiohemiacetal intermediate by crystal structure analysis.