She is still in the ship when the Knights betray Lelouch, and she still doesn't have her memories back. Lelouch is piloting his mech in the battle and is forced to flee for his life, leaving C.C. behind. When the Knights join up with Schnizel who cuts them a deal, get Japan back in exchange for Lelouch, the fact that C.C. is among the new converts comes to the attention of Charles who orders her brought to him. He then uses the Sword of Aksha to restore her, and then twists words to make C.C. think that Lelouch was just using her and abandoned her when it was convenient.
C.C. becomes the final boss.