Clarke survived getting her mind wiped in The 100 season 6 due to lucky circumstances and computer chips from her role in the season 3 finale.
After Josephine Lightbourne took over her body in The 100 season 6, episode 4, Clarke Griffin managed to survive because of her interactions with the City of Light back in the season 3 finale. Josephine taking over Clarke’s body set off most of the plot in The 100 season 6, ultimately leading to the inability of the protagonists and people of Sanctum to work together, with ramifications that will continue to affect the characters going into the show’s final season.
The Mind Drives were a technology developed to allow the first families of Sanctum, known as the Primes, to live forever by hijacking bodies. It could only work by taking a fully developed adult, wiping their mind, and uploading the drive’s consciousness into it. This means that Clarke should have been dead from having Josephine take over her body, but she managed to survive anyway. While the main reason was to keep the protagonist alive, the show does explain how she survives the encounter, even if there’s not much time spent lingering on it.
Clarke survived the mind wipe by almost pure chance, as her consciousness was able to escape to ALIE’s chip in her head from when Clarke entered the City of Light at the end of season 3. Clarke took the chip to take on and defeat ALIE, and so she’s especially surprised when she wakes up in her mind and finds ALIE there. While ALIE was destroyed, a bit of her lives on in the computer chip in Clarke’s brain. She explains to Clarke that the neural mesh from that chip was still intact in Clarke’s head. When Russell and Simone Lightbourne wiped Clarke’s mind, they successfully brought their daughter Josephine back to life, but Clarke’s consciousness escaped to the chip.
The show doesn’t linger on this explanation for long, instead going deeper into Clarke’s personal conflicts and desire to just stop fighting. The speed at which it’s hand-waved away left many viewers confused and having to go back, unclear about how exactly Clarke lived. This is especially jarring, as Clarke’s death and return is pivotal to all the conflict in The 100 season 6. Madi’s killing spree, peace with Sanctum breaking down, and Clarke taking down the Primes from within all stem from this one event, so misunderstanding it can get in the way of the rest of the season.
Once it’s understood, Clarke’s survival informs the rest of the season and has an impact that will carry on into the seventh and final season. Clarke manages to defeat Josephine in her mind, killing her for good. This sets up Russell for his potential revenge mission in The 100 season 7, having finally lost his daughter for good. Russell also uses the knowledge of how Clarke survived to make sure that Clarke’s mother, Abby, doesn’t survive when Russell takes her body as a host for Simone, setting Clarke even more firmly against Russell.
While The 100 seemed willing to kill Clarke off in season 6, she’s still the protagonist and manages to survive to continue to lead her people into the upcoming final season. Through a fluke of having a computer chip in her brain for her consciousness to escape to, Clarke survived what should have been Josephine overwriting her mind completely, setting the main conflict for season 6 into motion.