Research questionHow can machine-learning decoders for quantum error correction generalize to unseen codes while providing calibrated uncertainty?Machine-learning decoders can perform well on codes seen during training yet become unreliable or overconfident when the code changes. Fault-tolerant operation requires uncertainty estimates that remain meaningful during decoding of previously unseen quantum error-correcting codes.