"We've made tremendous progress," Senate Majority Leader Harry Reid declared after an intense day of negotiations with Senate Republican leader Mitch McConnell and other lawmakers. "Perhaps tomorrow will be a bright day," he said, suggesting agreement could be announced soon after weeks of stubborn gridlock.
McConnell also voiced optimism - although not as much as Reid, D-Nev., had - and the details under discussion generated little if any satisfaction among rebellious House conservatives.
Officials said that in the discussion to date, the $16.7 trillion federal debt limit would be raised enough to permit the Treasury to borrow normally until mid-February, if not a few weeks longer.
The government would reopen with enough money to operate until mid-January at levels set previously, and agencies would be given flexibility in adjusting to reduced funding levels imposed by across-the-board spending cuts.
Officials cautioned that those details could change, and there was even more uncertainty about other elements of a possible deal.
Under discussion was a one-year delay in a $63 fee imposed on companies by the health care law known as Obamacare for everyone covered by an employer-sponsored plan. By day's end, though, Republican opposition to the provision placed it in jeopardy - just as Democrats had earlier pushed back against the proposed repeal of a medical device tax contained in the health care law.
The two sides were also discussing a requirement that individuals seeking subsidies under the health care law to pay for coverage would be subject to stronger income verification measures.
The government has been partly closed since Oct. 1, and the Obama administration says the Treasury will run out of borrowing authority to fully pay the nation's bills on Thursday.
The result has been a partisan showdown that polls show is alienating all sectors of the electorate except tea party supporters - and has been a big political loser for Republicans.
As a midweek deadline for raising the debt limit neared, the stock market turned positive on bullish predictions from the two longtime antagonists at the center of the talks, Reid and McConnell.
Though McConnell expressed optimism about an agreement, his words were not as strong as Reid's. "We've made substantial progress, and we look forward to making more progress in the near future," he said as the Senate adjourned for the evening.
At a mid-day visit to a charity not far from the White House, President Barack Obama blended optimism with a slap at Republicans.
"My hope is that a spirit of cooperation will move us forward over the next few hours," he said. And yet, he added, "If we don't start making some real progress both in the House and the Senate, and if Republicans aren't willing to set aside some of their partisan concerns in order to do what's right for the country, we stand a good chance of defaulting."
Stock prices, which had risen strongly late last week on hopes of an agreement, were down at the start of the day but then pushed higher as the Senate leaders voiced optimism. The Dow Jones industrial average rose 64 points.
Reid and McConnell met twice before midafternoon, their sessions sandwiched around a White House announcement that Obama was calling them and the party leaders in the House for the second time in less than a week to discuss the economy-threatening crises. The meeting was subsequently postponed and it was not clear when it might be rescheduled.
Any legislation would require passage in the Senate and also in the House, where a large faction of tea party-aligned lawmakers precipitated the shutdown two weeks ago despite the efforts of both McConnell and Republican Speaker John Boehner.
Boehner met with McConnell during the day, then with other House GOP leaders. His spokesman, Michael Steel, later said, "If the Senate comes to an agreement, we will review it with our members." A closed-door session was set for Tuesday morning.
One conservative with a seat at the GOP leadership table, Oklahoma Rep. James Lankford, said that based on what he had been told, the emerging package contained no policy victories for his party. As for raising the debt limit until February, he said, "That's a lot of dollars."
In addition to other elements of any deal, the two Senate leaders are expected to announce that House and Senate negotiators will seek a deficit-reduction agreement that could ease or eliminate a new round of automatic federal spending cuts scheduled to begin in January. While the current round of these cuts fell on both domestic programs and the military, the new reductions would hit primarily the Pentagon.
Democrats were resisting a Republican-backed proposal to suspend a medical device tax that was enacted as part of the health care law.
The officials spoke on condition of anonymity, saying they were not authorized to comment on the private discussions.
The president and a wide array of economists, bankers and politicians in both parties - at home and backed by world leaders - have all warned that default could have catastrophic consequences for both the domestic and global economies.
The doubters alternatively say no default will occur or that if it does, it won't be the calamity that others claim.
But after holding center stage for much of the current impasse, there was little doubt that they had been shunted aside as Reid and McConnell worked toward an agreement.
The prospect of a default and the possibility of a follow-on recession largely overshadowed the partial government shutdown that has furloughed 350,000 federal workers. Government research labs have been affected, veterans' services curtailed and much of the Occupational Safety and Health Organization shuttered.
With federal parks off-limits to visitors, the impact on tourism prompted several governors to petition Interior Secretary Sally Jewell successfully to permit the states to finance some re-openings.
The shutdown began on Oct. 1, at the beginning of the budget year, after the House adopted a strategy of conditioning broad federal spending legislation to a proposal to starve the three-year-old health care law of funding.
The president and Democrats refused, and the bruising struggle began, merging quickly with the fast-approaching deadline for a debt limit increase.
In the two weeks since, public opinion polls have charted a steady decline in Republican approval ratings, and an increase in the view that the party's lawmakers are acting out of political motivation.
The shutdown has proved problematic for the GOP in the Virginia governor's race, which is on the ballot this fall. Public opinion polls show the Democrat, Terry McAuliffe, ahead of Republican Ken Cuccinelli, who is caught between tea party supporters on the one side and the public's general unhappiness on the other, magnified by the large presence of federal workers in the state.
Associated Press writers Donna Cassata, Andrew Taylor, Alan Fram, Henry C. Jackson, Julie Pace, Jim Kuhnhenn and Ricardo Alonso-Zaldivar contributed to this report.