“We are proud that our agreement will make lasting institutional change that will strengthen our caucus and will help develop the next generation of Democratic leaders,” their statement said.

In a separate statement, Mr. Moulton, who had angered many of his colleagues with a campaign to block Ms. Pelosi’s seemingly inevitable ascent, said, “These conversations have been difficult, but we’re stronger because of them.”

“The leaders of our caucus will no longer be determined by tenure and loyalty but by frequent and open elections, giving us a better chance to change and evolve as the country does,” Mr. Moulton added. “They will also incentivize those in power to build our bench, something our party has struggled with for years. That’s progress.”

Still, Ms. Pelosi’s promise did not go far enough for some Democrats who, after 15 years, said they wanted a new leader. That she agreed to limit herself to another four was not the kind of change they were seeking.

“I can’t support a deal that would maintain the current leadership structure for another four years,” said Representative Kathleen Rice of New York. “That’s not my idea of a transition. I took on this fight because I wanted to see change, not more of the same.”

Under the compromise, Ms. Pelosi and the two other leaders would be limited to three two-year terms, with the possibility of a fourth if they could garner the support of two-thirds of the Democratic caucus. Given that Ms. Pelosi; Mr. Hoyer, who is in line to be the majority leader; and Mr. Clyburn, who is set to be the whip, have already served two terms in the top three posts, it would put a hard cap on their tenures, forcing them out by 2022.

“I have pushed for new leadership because I want to see generational change in the Democratic caucus,” Mr. Perlmutter said in a statement in which he pledged to support Ms. Pelosi. “I am now convinced that generational change has started and will continue to accelerate.”