Code CFTs are 2d conformal field theories defined by error-correcting codes. Recently, Dymarsky and Shapere generalized the construction of code CFTs to include quantum error-correcting codes. In this paper, we explore this connection at higher genus. We prove that the higher-genus partition functions take the form of polynomials of higher-weight theta functions, and that the higher-genus modular group acts as simple linear transformations on these polynomials. We explain how to solve the modular constraints explicitly, which we do for genus 2. The result is that modular invariance at genus 1 and genus 2 is much more constraining than genus 1 alone. This allows us to drastically reduce the space of possible code CFTs. We also consider a number of examples of “isospectral theories” — CFTs with the same genus 1 partition function — and we find that they have different genus 2 partition functions. Finally, we make connection to some 2d CFTs known from the modular bootstrap. The n = 4 theory conjectured to have the largest possible gap in Virasoro characters, the SO(8) WZW model, is a code CFT, allowing us to give an expression for its genus 2 partition function. We also find some other known CFTs which are not code theories but whose partition functions satisfy the same simple polynomial ansatz as the code theories. This leads us to speculate about the usefulness of the code polynomial form beyond the study of code CFTs.