  Higher genus modular invariance of two-dimensional conformal field theories
(CFTs) is a largely unexplored area. In this paper, we derive explicit
expressions for the higher genus partition functions of a specific class of
CFTs: code CFTs, which are constructed using classical error-correcting codes.
In this setting, the $\mathrm{Sp}(2g,\mathbb Z)$ modular transformations of
genus $g$ Riemann surfaces can be recast as a simple set of linear maps acting
on $2^g$ polynomial variables, which comprise an object called the code
enumerator polynomial. The CFT partition function is directly related to the
enumerator polynomial, meaning that solutions of the linear constraints from
modular invariance immediately give a set of seemingly consistent partition
functions at a given genus. We then find that higher genus constraints, plus
consistency under degeneration limits of the Riemann surface, greatly reduces
the number of possible code CFTs. This work provides a step towards a full
understanding of the constraints from higher genus modular invariance on 2d
CFTs.
