  Error-correcting codes are known to define chiral 2d lattice CFTs where all
the $U(1)$ symmetries are enhanced to $SU(2)$. In this paper, we extend this
construction to a broader class of length-$n$ codes which define full
(non-chiral) CFTs with $SU(2)^n$ symmetry, where $n=c+\bar c$. We show that
codes give a natural discrete ensemble of 2d theories in which one can compute
averaged observables. The partition functions obtained from averaging over all
codes weighted equally is found to be given by the sum over modular images of
the vacuum character of the full extended symmetry group, and in this case the
number of modular images is finite. This averaged partition function has a
large gap, scaling linearly with $n$, in primaries of the full $SU(2)^n$
symmetry group. Using the sum over modular images, we conjecture the form of
the genus-2 partition function. This exhibits the connected contributions to
disconnected boundaries characteristic of wormhole solutions in a bulk dual.
