WeWork, seeking a new chief executive to lead the co-working company’s overhaul, is in talks with John Legere of T-Mobile, according to two people briefed on the discussions.

Legere, who has been credited with reviving Bellevue-based T-Mobile since becoming its chief executive in 2012, is one of several candidates the company is considering, according to the people. WeWork last month received a bailout from SoftBank, the Japanese conglomerate that is WeWork’s largest outside shareholder.

WeWork was close to running out of money after rapidly expanding its network of office spaces. The company is expected to lay off thousands of employees and sell operations that aren’t part of its core business of subletting office space.

Facing questions about the viability of its business model and its unusual corporate governance, the company called off its initial public offering in September. Also that month, WeWork’s co-founder Adam Neumann stepped down as chief executive, to be replaced by two executives, Sebastian Gunningham and Artie Minson.

Any new chief executive will face a tough task turning around WeWork, which posted a $1.4 billion operating loss in the first half of the year. The company’s expenses soared as it leased new office space and spent huge sums refurbishing the locations. Nearly half of WeWork’s 600 locations were opened in the 12 months that ended in September — and it is not clear if and when they might become profitable.

Legere, 61, does not have a background in commercial real estate, but at T-Mobile he has been a disruptive force. He slashed prices, introduced new plans and heaped ridicule on rival cellphone companies like Verizon, AT&T and Sprint. His approach has paid off for T-Mobile, which has more than doubled its subscribers under Legere.

But Legere does have a connection to SoftBank: T-Mobile is seeking to merge with Sprint, which SoftBank controls. The deal has gained approval from the Department of Justice and the Federal Communications Commission but a group of state attorneys general has challenged the deal in U.S. District Court in New York.

A representative for T-Mobile declined to comment.