Just two trading days after its IPO, Elon Musk's SpaceX is buying AI coding startup Anysphere. The deal is meant to help the struggling xAI division catch up with Anthropic and OpenAI.

SpaceX has formally closed its $60 billion acquisition of Anysphere, the company behind the AI coding assistant Cursor. That's according to Reuters and Bloomberg. Anysphere's investors will receive SpaceX stock in return. The deal is expected to close in the third quarter of 2026.

SpaceX technically had 30 days after its public debut to decide on the acquisition. But the company moved fast, acting right after last week's Nasdaq listing, which valued SpaceX at over $2 trillion and made it one of the most valuable companies in the world. Shares climbed another eight percent on Tuesday, pushing the market cap toward $2.7 trillion, Bloomberg reports.

xAI buys its way into the coding race

For xAI, which merged with SpaceX in February, the deal is an admission above all else: in AI-assisted coding, one of the few commercially viable areas of generative AI so far, Musk's company trails Anthropic and OpenAI. Bloomberg reports that Cursor employees had already been working in xAI's offices for weeks on a joint model. SpaceX confirmed on X that it's training a new AI model with Cursor.