Republicans signed on to a very bad deal Wednesday night to re-open government and lift the debt ceiling. The only thing that can be said in its favor is that it is likely better than the deal they would ultimately have been forced to sign if they waited any longer.

Bad-to-worse has been the arc of this fight for Republicans. It started because Texas Sen. Ted Cruz persuaded House Republicans to make keeping the government open contingent on defunding ObamaCare. The idea was that enough Democrats would side with the GOP to do the trick.

The reality turned out just the opposite: Democrats held their ranks, the government shut down, but ObamaCare was not defunded. As time went on, the Democrats hardened their position, even on modifications to ObamaCare some earlier supported. In this they took their lead from a president who refused to negotiate.

Now it’s over, and what Republicans need most is a coherent message on the way forward. That would begin with an agreement that Republicans ought to be free to disagree on tactics without having others characterize them as sellouts. This is what happened to anyone who questioned the Cruz wisdom of making this fight about defunding ObamaCare, even when it was clear the Senate votes to defund it just weren’t there.

The GOP’s other problem, which is not Cruz’s fault, is that Cruz dominated because he had a clear message and GOP House and Senate leadership didn’t. The result was that instead of battling a president over a health-care act clearly not ready for prime time, Republicans spent much of their time battling among themselves with supporters left in limbo.

Right now, the pundits are back to writing how the shutdown has inflicted irreparable damage on Republicans. We’re not so sure. In the coming months, the contradictions and false promises of ObamaCare will be more personal to more Americans as they find out firsthand what it means for them and their families.

That gives Republicans an opening. But they will not be in a position to take advantage of it until the House and Senate Republican leadership comes up with a message and strategy people can understand.