But an agreement remained elusive on the farm bill, the subject of continuing disagreements between Republicans and Democrats over spending for food stamps and expanding crop insurance for farmers, among other issues. All the House could pass on Thursday was a simple one-month extension of the current law, which Senate Democrats oppose because they think it will distract from the completion of a new bill.

Earlier, with bipartisan support in hand for the budget deal, Speaker John A. Boehner of Ohio declared war on the outside conservative groups that tried to scuttle it. For the second day in a row, he accused groups like the Club for Growth, Heritage Action and Americans for Prosperity of reflexively opposing a reasonable plan to try to raise their profiles and improve their fund-raising.

He said the groups had devised the strategy of linking further government spending to the repeal of Mr. Obama’s health care law, then pressing their members and House Republicans to go along, even though they knew it would shut down the government and ultimately fail.

“Are you kidding me?” the speaker shouted, denouncing opposition to the budget accord. “There comes a point where some people step over the line. When you criticize something and you have no idea what you’re criticizing, it undermines your credibility.”

Yet when the Senate takes up the bill, Mitch McConnell of Kentucky, the Republican leader, is likely to vote against it, as are virtually all of the Republican senators who are contending with Tea Party challenges next year or are wooing conservatives for a potential presidential bid.