(CNN) — Days before publicly announcing his investmentin Twitter, Elon Musk texted with Jack Dorsey. The former Twitter CEO suggested he no longer believed in the company he founded, according to new court filings in the legal battle between Musk and Twitter.

Musk had begun quietly building up a large stake in Twitter in January. In a text on March 26, Dorsey told Musk, “a new platform is needed. It can’t be a company. This is why I left.”

Musk, an avid Twitter user who was often seen as friendly with Dorsey, responded by asking what the platform should look like. Dorsey explained his view that it should be “an open source protocol” and not rely on “an advertising model,” as Twitter currently does. Dorsey added that Twitter “should never have been a company,” saying, “that was the original sin.”

Musk expressed interest in advancing the idea. In a later text that day, he said: “I think it’s worth both trying to move Twitter in a better direction and doing something new that’s decentralized.”

The private exchanges between Dorsey and Musk are among the many text messages released in court filings this week, offering new insight into the Tesla CEO’s agreement to buy Twitter for $44 billion and his attempt later to back away from the deal. The messages also offer a unique window into Silicon Valley deal-making, as a rotating cast of billionaires and industry execs slide into Musk’s text messages to discuss Twitter and, in some cases, casually offer financial backing for the deal.

In the days following his private chat with Dorsey, Musk met with Twitter’s board and leadership. On April 5, Musk agreed to join the company’s board, a move that Dorsey championed publicly and privately. In a text exchange with Musk later that day, Dorsey expressed confidence in Parag Agrawal, his successor as Twitter’s CEO. Agrawal also expressed excitement in private texts about Musk joining the board.

But the relationship between Musk and the Twitter CEO appeared to sour quickly.

On April 9, Musk tweeted a question: “Is Twitter dying?” Agrawal followed up that day with a text letting Musk know such comments would make the CEO’s life difficult.

“You are free to tweet ‘is Twitter dying?’ or anything else about Twitter,” Agrawal said in the text to Musk, “but it’s my responsibility to tell you that it’s not helping me make Twitter better in the current context. Next time we speak, I’d like you to provide [your] perspective on the level of internal distraction right now and how [it’s] hurting our ability to do work … I’d like the company to get to a place where we are more resilient and don’t get distracted, but we aren’t there right now.”

Musk responded tersely: “What did you get done this week?” In two follow-up texts, he rescinded his agreement to join the board, saying, “I’m not joining the board. This is a waste of time.” He added: “Will make an offer to take Twitter private.”

In a separate exchange on the same day with Twitter’s board chair Bret Taylor, Musk said: “Fixing Twitter by chatting with Parag won’t work,” Musk said. He added in a follow up text: “Drastic action is needed.”

Musk and Twitter announced an acquisition agreement on April 25. A little more than two months later, Musk said he wanted out of the deal, citing concerns about the number of bot and spam accounts on the platform. Twitter then sued Musk to compel him to follow through with the deal.

The two sides are set to go to trial over the deal next month.

(Copyright (c) 2022 CNN. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)

Join our Newsletter for the latest news right to your inbox