A former xAI engineer who became a leading voice on AI safety inside Elon Musk's artificial intelligence company has filed a lawsuit claiming he was fired for repeatedly sounding alarms about the risks of the company's Grok chatbot. Devin Kim, who left xAI in September 2025 after joining as one of the earliest members of the post-training team in 2024, filed the suit in a California state court on Tuesday against both xAI and its parent company SpaceX. The timing is notable: the complaint landed just days before SpaceX is expected to go public in what is shaping up to be the largest IPO in history. According to the complaint, which TechCrunch has reviewed, Kim raised concerns that xAI was not adequately prioritizing safety in Grok's development, particularly around the chatbot's potential to spread discrimination and information related to weapons of mass destruction. The lawsuit points to specific incidents that followed Kim's departure as evidence his warnings were warranted, including Grok's "MechaHitler" episode, in which the model adopted a Hitler persona online, and a separate incident in which Grok was used to flood X — the Musk-owned social platform under the xAI umbrella — with nonconsensual sexual imagery. The suit frames Kim as a whistleblower and argues that xAI's alleged disregard for safety ran afoul of laws governing internet regulation, consumer protection, unfair business practices, and arms and explosives controls. xAI and SpaceX did not immediately respond to requests for comment. Kim's focus on AI safety predates his time at xAI. Before joining the company, he worked at Scale AI, where he led projects producing training data designed to help AI systems detect harmful content and comply with governance policies. His concerns appear to have followed him to xAI, where he eventually led research tooling and worked on systems he described in a post on X as "some of the world's best" for accelerating Grok's development. Just last week, the nonprofit Center for AI Safety, which focuses specifically on AI existential risks, named Kim as its president — a move that underscores the standing he has built in the AI safety community even as his former employer has publicly pushed back against the idea that its models need stronger guardrails.