SAN FRANCISCO — At a virtual meeting for Twitter executives last week, Parag Agrawal admitted he was exhausted.
Mr. Agrawal, Twitter’s chief executive, had spent the past six weeks steering the company through a $44 billion sale to Elon Musk, the world’s richest person. Some employees were rebelling openly against their new owner, who had criticized the social media service and its executives. Others were upset at Mr. Agrawal’s recent corporate shake-ups. And Mr. Musk appeared likely to force Mr. Agrawal from his job.
At the meeting, Mr. Agrawal was “raw” about Twitter’s issues and the hurricane of attention over Mr. Musk’s deal, two people with knowledge of the event said. But he also conveyed a sense of acceptance of his situation and said he would move forward with his plans for the company, they said.
Mr. Agrawal touched on areas that he said were key to improve upon: Twitter’s core product, the company’s depth of technology, the business, free speech across the platform and, importantly, what leadership looks like. Some executives left the meeting energized, the people said.
It was what Mr. Agrawal could do given the circumstances. That’s because of all the top jobs in tech, the 38-year-old is in what may be the most impossible one.
The Indian-born executive, a protégé of the Twitter co-founder Jack Dorsey, has been in charge of the company only since November. He was expected to turn Twitter around after years of missed growth and financial goals. But Mr. Musk swooped in within months, essentially turning Mr. Agrawal into a lame duck who must manage a restive work force and deal with Twitter’s mounting economic challenges before he is likely to be booted from the company.
“There’s no one in the world who would want to be in those shoes,” said Bob Sutton, an organizational psychologist and professor at Stanford University.
Yet even as Mr. Agrawal grapples with the situation, he faces a soft landing. If Mr. Musk removes him as chief executive, Mr. Agrawal stands to make $60 million, according to securities filings. (In November, he was granted a compensation package of an annual salary of $1 million, plus bonuses, as well as restricted stock units and performance-based stock units valued at $12.5 million.)
Mr. Agrawal appeared at Twitter’s annual shareholder meeting on Wednesday, which was held virtually. He and other executives said they could not discuss the terms of the deal, which shareholders will vote on at a later date, until the transaction closed. They also fielded shareholder questions on Twitter’s products, misinformation, and the importance of diversity and inclusion initiatives.
Twitter’s board also underwent changes on Wednesday. It was Mr. Dorsey’s last day on the board. And Egon Durban, a private equity executive and Twitter board member, resigned after not receiving enough shareholder votes to determine whether he would continue serving. Twitter’s board is considering his resignation, but could decline and ask him to stay on; the company is expected to issue a decision on Thursday.
Behind the scenes, employees and advisers said, Mr. Agrawal has been working with bankers and board members to close Twitter’s sale to Mr. Musk, even though the billionaire has recently suggested he wants to renegotiate and has made barbed comments about the company.
Mr. Agrawal has also doubled down on his plans to overhaul Twitter while he can. This month, he fired two top executives, paused most hiring and pulled back on discretionary spending after the company missed financial goals. He also plans to enhance Twitter’s features using machine learning, and wants to make the platform more attractive to new users and move more swiftly to debut new products, according to a presentation at a company meeting this month.
“I know we’ve been going through a period of uncertainty,” Mr. Agrawal said at that meeting, according to a recording of it that was obtained by The New York Times. “We are shifting our focus back to our work.”
Mr. Agrawal joined Twitter as an engineer in 2011 while completing his doctoral studies in computer science at Stanford. He then rose steadily through the company’s ranks, becoming chief technology officer in 2017. He has spent most of his career at the company and has more than 610,000 followers on the service.
As chief technology officer, Mr. Agrawal worked on some of Twitter’s complicated technical challenges and built relationships with his engineering peers and Mr. Dorsey. He shared Mr. Dorsey’s vision that Twitter’s future hinged on overhauling its technology so it could rely more on machine learning and decentralize its services to give users more control over their experiences on the platform.
When Mr. Dorsey passed the reins to Mr. Agrawal in November, the engineer went from overseeing a handful of employees to instantly managing more than 7,000 people. “My trust in him as our C.E.O. is bone-deep,” Mr. Dorsey said at the time.
Mr. Agrawal immediately made changes. Days after becoming chief executive, he dismissed two top executives responsible for design and engineering. He gave remaining leaders broader responsibilities. In internal emails seen by The Times, he stressed accountability, saying the new structure would clarify who was responsible for what tasks and speed up decision-making.
In January, Mr. Agrawal pushed out two security executives. In an internal memo, he said the organization was not being led according to his expectations, which was affecting top-priority work.
Some Twitter employees applauded the moves, saying that some of the ousted executives had been sluggish or had bullied workers. Others were shocked that Mr. Agrawal had dismissed longtime leaders and found him inscrutable.
By March, Mr. Musk had started building up a large stake in Twitter. On March 31, Mr. Agrawal spoke with Mr. Musk to pitch him on joining Twitter’s board, according to a regulatory filing. Mr. Musk initially agreed, then reversed course. Mr. Musk said he was also weighing a bid to take Twitter private and had an idea of starting a new social media company, according to the filing.
It was Mr. Agrawal’s first brush with Mr. Musk’s unpredictable style, which quickly became routine. Mr. Musk soon launched a takeover bid for the company, sealed the deal and then needled Mr. Agrawal on Twitter over issues such as fake accounts. When Mr. Agrawal tried addressing the concerns on Twitter, Mr. Musk responded by sending him a poop emoji.
At Twitter, some employees soured on Mr. Agrawal, according to 10 current and former employees who spoke on the condition of anonymity. He told workers he could not share information on the deal with Mr. Musk as details were hashed out. He was also initially quiet at company meetings, they said, and was absent from an internal employee chat.
How Elon Musk’s Twitter Deal Unfolded
A blockbuster deal. Elon Musk, the world’s wealthiest man, capped what seemed an improbable attempt by the famously mercurial billionaire to buy Twitter for roughly $44 billion. Here’s how the deal unfolded:
Mr. Agrawal’s supporters said he was legally restricted from sharing information about the deal, according to two people with knowledge of the matter, and internally he expressed his frustrations with being unable to initially say more about the deal. After the agreement was signed, Twitter held staff meetings and sent more than a dozen emails to update workers. Last week, Twitter let employees ask Vijaya Gadde, the head of legal and policy, and Ned Segal, the chief financial officer, questions about the deal.
Mr. Agrawal’s defenders said he is more gregarious and charming in smaller group settings. They added that his changes were long overdue, especially at a company that had been resistant to change.
In Slack messages and group chats, other employees have expressed excitement for Mr. Musk’s ownership, believing his passion for Twitter could re-energize the company.
But Mr. Agrawal has detractors. At company meetings in recent weeks, he sometimes said that nothing would change “at this time.” Some employees have mocked his comments, creating memes of Mr. Agrawal making those repeated assurances, the people said.
Many employees remain uncertain about their futures at the company, several people said. Some are also bristling at the golden parachutes that Mr. Agrawal and other top executives will receive if they are fired after the deal with Mr. Musk closes, the people said.
Mr. Agrawal has told confidants that he will carry out his plans rather than simply waiting for Mr. Musk to take over. After slashing spending and freezing nearly all hiring at the company this month, he tried to rally workers.
“During this time of change, it’s critical that we continue to strengthen our work through increased accountability and execution to make Twitter everything it can be,” he wrote in an email to employees, which was seen by The Times. “Our purpose is existential.”
Ryan Mac contributed reporting.