After days of corporate chaos that has captivated the tech industry, OpenAI cofounder and recently fired CEO Sam Altman is set to return to his position.

In a statement posted to X late Tuesday, OpenAI said it had reached an agreement “in principle” for Altman to return to OpenAI as CEO. The statement said a new, “initial,” board of directors would be appointed, including former Salesforce co-CEO Bret Taylor as chair, former US Secretary of the Treasury Larry Summers, and Adam D’Angelo, who would be the only existing director to remain on the board.

Altman posted on X, in his characteristic lower-case style, “i love openai, and everything i’ve done over the past few days has been in service of keeping this team and its mission together.”

Greg Brockman, an OpenAI cofounder who was removed from his role as chair of the board when Altman was fired and later quit in protest, is also set to regain his position. “Returning to OpenAI & getting back to coding tonight,” he posted on X.

OpenAI’s proposed new board would appear to remove three directors who voted to eject Altman: OpenAI cofounder and chief scientist Ilya Sutskever, Helen Toner of Georgetown’s Center for Security and Emerging Technology, and entrepreneur Tasha McCauley. Toner posted on X, “And now, we all get some sleep 😴.” McCauley and Sutskever didn’t immediately respond to requests for comment.

The Verge reported that under the proposed agreement the initial board will appoint a new board of up to nine people to reshape the corporate governance of OpenAI. It is unclear whether Altman himself will have a seat on the board.

Kelly Sims, a partner at Thrive Capital, a major OpenAI investor that supported Altman’s negotiations with the company’s board in recent days, issued a statement welcoming his return. “Sam and Greg possess a profound commitment to the company’s integrity, and an unmatched ability to inspire and lead,” the statement said. “We believe this is the best outcome for the company, its employees, those who build on their technologies, and the world at large,” Sims said.

Long Road Back

OpenAI was in “intense” negotiations earlier on Tuesday with Altman and the board of directors that ousted him last Friday, in an effort to rescue the embattled company. The talks were acknowledged in a memo sent to staff Monday by OpenAI’s vice president of global affairs, Anna Makanju, which said the discussions included Altman, the board, and the new interim CEO, Emmett Shear.

Shear posted on X after OpenAI’s announcement of the agreement for Altman to return that he was “deeply pleased by this result, after ~72 very intense hours of work.” It was unclear whether he would be staying at the company.