Assuming no snag in the House, both chambers could pass the deal on Wednesday or Thursday. President Obama would then sign it.
What does the deal involve?
The deal has five main elements. It would:
-- Reopen the government and fund it through Jan. 15, 2014.
-- Raise the debt limit Feb. 7, 2014, but allows federal borrowing to continue for a few weeks longer, using special accounting measures.
-- Require additional measures, favored by Republicans, to ensure that people who receive financial help in buying health insurance under President Obama's Affordable Care Act are being honest about their income.
-- Set up a negotiating committee to try to come up with a longer-term budget plan so we don't go through this again early next year. The committee would be expected to issue budget recommendations by Dec. 13.
-- Provide back pay to furloughed federal workers
Is there a chance something goes wrong and in fact the deal will fall apart?
There's always a chance, but things look okay right now.
When would federal agencies reopen?
Probably a day or two after Obama signs a deal.
Why did this take so long?
There are two answers to this question.
2. A group of conservative "tea party" Republicans in the House insisted on significant changes to Obama's health care law in order to keep the government functioning.
But there aren't actually major changes to the health care law in the deal, right?
Who's won and who's lost?
What a simplistic way of thinking about things! But since you asked, it seems pretty clear in this round of the budget wars, Obama and the Democrats will have outmaneuvered their Republican opponents.
House Republicans decided to shut down the government in hopes of major changes to Obamacare, as they and many others call the health-care law. None is in the offing.
Senate Republicans reluctantly went along with that strategy -- at least for a while. In the meantime, the GOP brand was badly beaten up in the polls.
Prognosticators now guess that Republicans could have a very hard time winning the Senate in 2014 -- even though the electoral map is stacked against the Democrats. But the House still looks safe for the GOP.
Meanwhile, Obama and Democrats stayed firm to their view that they would not pay a "ransom" to accomplish the basic tasks of keeping the government open and raising the debt limit.
Hold up one second. Hasn't Obama been forced to compromise to raise the debt ceiling and open the government?
Not really. Obama is giving the flimsiest of fig leaves to the Republicans -- a promise to do a better job ensuring that people who report their income to get help buying health insurance under the health-care law are actually reporting their income properly. There were already some assurances in the health-care law, so all the president is promising is an additional layer of scrutiny.
So is it all wonderful for Obama and Democrats?
Nope. The truth is that for all the drama, they're getting little out of this deal. They don't roll back the deep spending cuts known as the sequester that took effect earlier this year and are eating away at domestic priorities such as education and research and development. They don't get new money to spend on jobs or an immigration bill.
They just get a political win. And they avoid an economic disaster.
What happens next?
Well, per the outlines of the agreement, both Republicans and Democrats would assign lawmakers to a committee to hash out a broader budget plan for the coming year. These joint efforts have not had success in the past, and we've gone years without a formal budget.
But hope dies hard. For Democrats and Republicans alike, the basic question in the committee will be whether they find a way to roll back the sequester, which is due to launch a new round of budget cuts in January.
Democrats hate the sequester, because it's basically the opposite of the vision of domestic investment they've long campaigned on. Republicans are more ambivalent, but there are many in the GOP who don't like how deeply it cuts Pentagon spending.
The most likely path to replacing part of the sequester is to make cuts to mandatory spending -- such as health-care programs or farm subsidies -- instead. On a practical level, Republicans and Democrats agree that mandatory spending is better to cut since it's the long-term driver of our debt. But mandatory spending has pretty entrenched constituencies -- such as the elderly or farmers -- which makes such cuts difficult to achieve.
A bigger budget deal -- the elusive "grand bargain" -- could also be considered as part of the conference. But any discussion of significant changes to mandatory spending usually leads Democrats to insist on new taxes, which has been a deal-breaker for the GOP.
What happens if the committee fails to come to an agreement and we're back in January with new deadlines?
Most likely, neither side will want a new fight over government funding or the debt ceiling with the midterm elections fast approaching. So they'll just extend everything once again, leaving sequester cuts in place, and the voters will decide what they want come November.
Like that's worked well in the past.