Ms. Pelosi was part of the bipartisan negotiations that led to the budget deal, which included $131 billion for Democratic priorities — including public works, children’s and veterans’ health programs and opioid abuse prevention — as well as an infusion of money for hurricane-ravaged areas like Puerto Rico and Texas. She said she understood that, for many in her caucus, the deal was “too good” to vote against.

But the leader had also made personal commitments to the Dreamers, hundreds of thousands of whom have been shielded from deportation under an Obama-era program called DACA, for Deferred Action for Childhood Arrivals. Mr. Trump rescinded the program and gave Congress until early March to come up with a replacement. Ms. Pelosi and her fellow Democrats had promised the young immigrants that a measure to help them would be included in any spending deal — a promise she was not able to keep.

In staging her marathon monologue — the longest in more than a century, according to the House historian — and pressing for no votes on the spending bill, Ms. Pelosi hoped to pressure Speaker Paul D. Ryan into scheduling a free and open debate on immigration, as Senator Mitch McConnell, the Republican leader, did in the Senate.

Mr. McConnell is giving the Senate a week to debate any immigration issue that senators wish to bring up; rather than put a measure on the floor, he has taken the highly unusual step of introducing a shell bill that senators may amend and shape as they see fit.

In effect, he is allowing the Senate to build an immigration bill from scratch; no one has any idea how it will turn out.

Mr. Ryan has refused to follow suit, though he has pledged to take up an immigration bill at some point, so long as it is one the president supports. And now that the spending bill has been adopted, Democrats in the House may have lost whatever leverage they had to demand protections for the Dreamers.

“We would like to have had a commitment from the speaker, but we’re not stopping,” Ms. Pelosi said.

That is unlikely to mollify her critics on the left, who say she did not work hard enough to force Speaker Ryan’s hand. Representative Luis V. Gutiérrez, Democrat of Illinois, said that if Ms. Pelosi had really wanted to take a stand to protect the Dreamers, she could have threatened to strip lawmakers of their committee assignments if they did not vote no on the budget deal.