SAN FRANCISCO — Dick Costolo didn’t know he would be replaced as Twitter chief executive until the three-hour meeting with the Twitter board in June at which his fate was decided.

“We went into the meeting open to having a discussion about what the timing would be,” Costolo said.

Costolo made the revelation today onstage at the Bloomberg Technology Conference here.

Costolo and the board started succession planning at the end of 2014, he said, and discussions got more serious at the June meeting of the company’s board. At that meeting, the board decided they would rather make an announcement and do the search out in the open, rather than do a stealth search and then try to manage the rumors as they leaked out.

Twitter announced on June 11 that Costolo would be stepping down as CEO, to be replaced by Twitter cofounder Jack Dorsey. While his role as chief executive looks a little lackluster now — especially to Wall Street — he actually accomplished a lot in five years at Twitter’s helm. He may not be getting a fat severance package, but he should have a nice chunk of stock to cushion his fall.

What’s next for Twitter? Costolo, who will remain on the board, remained optimistic and upbeat.

“We have the blessing of working at a company that everybody cares about … I’d much rather work there than at a place where people don’t care.”

Yes, there are critics, but he didn’t engage with them when prompted by his onstage interviewer, Bloomberg’s Brad Stone.

“It’s all a rich tapestry,” Costolo said, when asked about Chris Sacca’s lengthy manifesto on how Twitter could do better.

Costolo says he has an excellent relationship with Dorsey, and that they have dinner every Tuesday night.

“I’m just delighted he’s stepping into this role,” Costolo said. “He has this clarity of thinking about the product that doesn’t bring the conceptual baggage other people bring to it.”

Is the board’s search for a new CEO just a cover story to allow Dorsey to become the permanent CEO?

“The board is legitimately doing a search,” Costolo said.

“The pace of execution this year has been more than satisfying to me,” he said, regarding Twitter’s product development. That’s an improvement over last year, when Costolo said in a quarterly earnings call that he was not pleased with how fast Twitter was able to roll out new products.

“We have things rolling out this fall that I’m over the moon about,” he said, and added that he and Dorsey are in alignment on the company’s future direction.

“We like the strategy that’s in place, and we like the team that’s in place.”

Other than serving on Twitter’s board, Costolo has no specific plans for what he’s going to do next. He is ruling one thing out, however.

“I don’t think it would be a smart move for me to return to standup comedy,” he said. “I get heckled for free now.”