Well there you have it: with only a day remaining before the August recess, Republicans in the House of Representatives will not be passing a bill to address the large numbers of Central American children showing up at the southern border — something they all agreed was an urgent crisis that required immediate attention — after being unable to agree amongst themselves:

House Republicans pulled Speaker John A. Boehner’s slimmed-down legislation to address the brewing immigration crisis at the U.S.-Mexico border rather than see it defeated, amid a conservative revolt that the $659 million proposal did not address the core issues.

Faced with certain defeat, Boehner pulled the legislation from consideration Thursday afternoon, according to guidance from leadership advisers. With more than 20 House conservatives opposed, Boehner did not have enough votes from his own Republican ranks because virtually all Democrats opposed the legislation.

Among the people Boehner can thank for this debacle is Sen. Ted Cruz, who encouraged House Republicans not to go along with Boehner’s bill unless it blocked expansion of the Obama administration’s Deferred Action for Childhood Arrivals policy giving the DREAMers deportation relief. Any bill that included that would have been dead on arrival in the Senate, so what Republicans have decided to do is nothing, and hope that Barack Obama gets the blame. There’s some chatter that Republicans could still come together and pass something, but even if they do, the chaos has been so ridiculous that the damage has already been done — at at any rate, they failed to act on broader reform.

Speaking of the President, they did find time to vote last night to sue him. That, they can agree on. Though they didn’t seem to grasp it, the lawsuit is a political disaster in the making, and their failure on immigration reform just made it worse.

Boehner evidently thinks the suit is a way to keep pressure on Obama while reducing the pressure from within the GOP caucus for more extreme action, without the political catastrophe that impeachment would set in motion. But consider the various scenarios for this suit. First, it’s going to take some time to prepare — time that Barack Obama will spend taking executive actions and gleefully mocking Republicans for the suit, which will enrage them further. “Stop being mad all the time,” he told them yesterday. “Stop hating all the time.”

What’s more, when the suit is finally filed, you can bet the right wing will find it insufficient. After all, they already believe Obama has committed crimes worthy of impeachment, even if many of them see the political wisdom of not taking that path. Whatever the suit’s charges, the right will complain that they don’t go far enough, and Boehner will find himself defending his caution.

And there is a strong possibility that the suit won’t get past the first judge that hears it, on the question of standing. The plaintiffs may not be able to show that they’ve sustained an injury that the suit can remedy. While legal experts aren’t completely unanimous on this question, most seem to believe that the lawsuit will be dismissed, based on precedent. If that happens, the members (and voters) to Boehner’s right aren’t likely to say, “Well, we tried” and give up. They’ll blame Boehner for not being forceful enough in his opposition to Obama, and the internal tensions will only get worse.

Of course, the suit might be heard by a friendly district judge who would allow it to proceed. But there would then be multiple points for it to be lost. That judge could allow it to proceed and then rule against the Republicans It would be appealed to the D.C. Circuit and heard by a three-judge panel, who could find for the administration. It could then be appealed to the entire circuit court, who could do the same. So could the Supreme Court. And even if the House Republicans were to ultimately prevail, what would they win? At best, the administration might be required to do something like immediately implement the Affordable Care Act’s employer mandate, which has been delayed (and yes, Republicans are suing Obama because they’re angry that he temporarily delayed implementation of a provision they hate in a law they hate).

Would that be the kind of victory that would lead the party’s hard-core conservatives to hoist John Boehner up on their shoulders and carry him through the Capitol with tears of joy in their eyes? Don’t bet on it.

But the lawsuit will be great for one group in Washington: Democrats. They can use it to argue that Republicans are partisan extremists who don’t care at all about actually doing anything for the country, and would rather spend their time screaming about Benghazi and suing the President.

And when Democrats go about making that case, the failure of immigration reform will be one of their most compelling pieces of supporting evidence. Obama can say: Look, I tried to get Republicans to help us confront this humanitarian crisis. They said they wanted to. And then what did they do? They voted to sue me, then skipped town without passing anything addressing that crisis!

When Obama takes some kind of executive action to address the broader immigration problem, Republican complaints that he’s being tyrannical will be undermined by the GOP’s abysmal failure to offer an alternative. If they had passed a border bill he vetoed, or one that died in the Senate, they could claim they tried to solve the problem. But now all they’ve got to show for the end of the session is a lawsuit — one that will probably offer their own right wing nothing but frustration and disappointment, and will validate everything Obama is saying about them.