Chris Lattner, a longtime Apple software guru, has left his post running software for Tesla’s Autopilot division after just six months. Lattner announced his departure in a tweet late Tuesday. Earlier in the evening, Tesla announced that it had hired leading AI expert Andrej Karpathy as the company’s new director of AI and Autopilot. Karpathy had previously been a researcher at OpenAI, a nonprofit effort to advance artificial intelligence started by Musk and other Silicon Valley veterans.

“Turns out that Tesla isn't a good fit for me after all,” Lattner wrote. “I'm interested to hear about interesting roles for a seasoned engineering leader!”

A Tesla spokesperson confirmed Lattner’s departure, adding that "Chris just wasn’t the right fit for Tesla, and we’ve decided to make a change. We wish him the best.” Jim Keller, who oversees hardware for Autopilot, will take on Lattner’s duties in the meantime.

Lattner joined Tesla at a crucial time for Autopilot

Lattner joined Tesla in January as the vice president of Autopilot Software. The electric car company hired him away from Apple, where he notably led the development of the Swift programming language. At the time of tweeting about his departure, Lattner’s Twitter bio still referred to Tesla’s Autopilot software as “the new frontier.”

Turns out that Tesla isn't a good fit for me after all. I'm interested to hear about interesting roles for a seasoned engineering leader! — Chris Lattner (@clattner_llvm) June 21, 2017

He joined Tesla at a crucial time for the company’s Autopilot software. Just months before, the manufacturer parted ways with Mobileye, an Israeli company that provided tech for the first version of Tesla’s semi-autonomous software. The split occurred after the two companies argued over which side’s tech was to blame for Autopilot’s failure in preventing the death of Josh Brown, a Tesla owner who died last summer after impacting a tractor trailer while using the self-driving feature.

Since then, Tesla has been rebuilding its own version of Autopilot without Mobileye’s tech. It was only earlier this month that CEO Elon Musk said that he thinks Tesla’s system was nearing the quality it once had with Mobileye’s tech integrated into its cars.

“It’s definitely been a tough slog transitioning from the Mobileye vision chip to Tesla’s internal vision system, but I think we’re almost there in terms of exceeding the ability of the hardware one cars,” Musk said during the company’s annual meeting with shareholders.