Abstract
The genetic code defines the correspondence between codons in genes and amino acids in proteins. Reassignment of sense codons to different amino acids can create cells with refactored genetic codes that are distinct from the canonical genetic code. By encoding essential genes according to the refactored genetic code, this code becomes locked-in, making it essential to the host cell. Here, we show that refactoring the structure of the genetic code alone is sufficient to confer temporary resistance to complex mobile genetic elements, such as viruses. However, when the refactored genetic code is not locked-in, it can revert, leading to loss of resistance. Thus, locking the refactored genetic code may be crucial for maintaining stable, long-term resistance in the face of sporadic and unpredictable viral infection.