How Did the X-Men Stop Her?

Amid all the chaos of debilitating the X-Men while also bringing the Shi’ar Imperial Guard to their turf to try and finish them off, Cassandra attempted to capitalize on the chaos by making her way to Cerebra, the telepathic-boosting supercomputer Charles used to detect newly-awoken Mutants—and with it, extend her already vast powers so she could psychically command every mutant in the world to kill themselves. However, upon reaching Cerebra Cassandra discovered at trap lying in wait: Jean Grey, having re-tapped into her connection to the Phoenix Force, had managed to extricate Charles’ consciousness from Cassandra’s sabotaged body, hold it in herself, and then store it in Cerebra.
Able to force Cassandra from his body, she fled into what she believed was her original physical form—but was actually the shapeshifting form of the Imperial Superguardian known as Stuff, disguised as Cassandra’s body. With her real form dead from the genetic sabotage Cassandra had intended to kill Charles with, Cassandra’s conciousness was wiped and reverted to a childlike state, psionically trapped within Stuff’s form as she went through a psychic re-education process by mental copies of Jean and Charles, in the hopes that she could be re-trained into a functioning member of mutant society some day.