A deal would be possible because Republicans valued B more than A, and Democrats valued A more than B.
So, for example, Republicans might offer a temporary increase in spending from the levels of sequestration in order to delay the time when the Internal Revenue Service starts fining people for not buying insurance (which is scheduled for the spring of 2015).
Republicans might do this because they think that delaying the mandate will make it easier for them eventually to get rid of the health-care law, and Democrats might do it because they think their law will grow more popular with time.
In that case, they couldn't both be right, but they could both be happy about the deal at the time they made it.
At the same time, a deal should include policies that minimize the potential damage of a future debt-limit standoff.
The most important one would be a law stipulating that even if the debt limit is breached in the future, the government will still be authorized to make debt-service payments in full, taking a default off the table.
Republicans in the House have already passed a bill that would come close to doing this. Once this change is enacted, hitting the debt limit would mean having a partial government shutdown —which isn't great, but not the disaster a default would be.
Could any of this happen? Well, most Republicans have already backed off the demands that their maximalists have been making: A majority of the House has already voted to keep the government funded without defunding Obamacare (but making changes to it).
House Speaker John Boehner has said that he would rely on Democratic votes if necessary to prevent a default. And he has also, at least through leaks, put relief from sequestration the table.
When the House Republicans passed their bill to reduce the risks of a default, they implicitly acknowledged that the threat of default doesn't actually provide the leverage to get anything constructive done, or at least anything worth the potential costs.
They should follow that logic to its conclusion. Republicans can end the government shutdown, avoid a default and get a policy victory — but only if Democrats get one, too.
Ramesh Ponnuru is a Bloomberg View columnist, a visiting fellow at the American Enterprise Institute and a senior editor at National Review.