(L-R) House Minority Whip Steny Hoyer (D-MD), House Speaker designate Nancy Pelosi (D-CA) and Senate Minority Leader Charles Schumer (D-NY) talk to journalists at the White House January 02, 2019 in Washington, DC.Chip Somodevilla | Getty ImagesDemocrats moved Tuesday to put the final touches on a deal to invest up to $2 trillion in social programs and climate policy, as they try to cap a monthslong slog to pass their economic agenda.After days of talks among House, Senate and White House officials, party leaders sounded more optimistic than ever about striking an agreement. Top Democrats acknowledged a handful of issues were unresolved, which could trip up the rush toward a deal and votes in the coming days.”Most of that has been negotiated, most of it is ready to go,” House Majority Leader Steny Hoyer, the No. 2 Democrat in the chamber, told reporters about the bill. “And we are just waiting for the last parts of the bill to be put together. We’re hopeful that that will be done in the next few hours, frankly.”Earlier Tuesday, House Speaker Nancy Pelosi told reporters that 90% of the safety net legislation is written. Senate Majority Leader Chuck Schumer, who on Monday said his party had to resolve three or four outstanding issues, also sounded optimistic about reaching a deal.”This week, Democrats are continuing to make important progress toward finalizing President Biden’s Build Back Better plan, and we remain confident that a final deal is within reach,” he said Tuesday on the Senate floor.CNBC PoliticsRead more of CNBC’s politics coverage:Reaching an agreement to invest in social programs and climate policy is critical for Democrats to forge ahead with their full economic agenda. House progressives have withheld votes for a $1 trillion bipartisan infrastructure bill until the party can make progress on the bigger spending package, which Democrats plan to pass without Republicans through the budget reconciliation process.House leaders could tee up a vote on the Senate-passed infrastructure plan as soon as this week — if the party strikes a social spending deal. Pelosi on Tuesday told House Democrats that the chamber will vote on the bipartisan bill only after an agreement on the Democratic plan, NBC News reported, citing three sources in the room.To do so, Democrats will have to win over everyone from Senate centrists wary of additional spending to progressives who want to invest trillions of dollars more in social programs. Pelosi has repeatedly said she will only hold a House vote on a bill if it has enough support to get through the Senate.Democrats have slashed spending from their $3.5 trillion budget blueprint in order to appease centrists. Sen. Joe Manchin, a West Virginia Democrat who backs a $1.5 trillion price tag, and Sen. Kyrsten Sinema, D-Ariz., have pushed their party to trim the package.Lawmakers have also sought alternative tools to offset the spending after Sinema shot down increases in the tax rates paid by corporations and the wealthiest Americans. Options include a 15% minimum tax on corporations and a tax on gains in stocks and other assets levied on billionaires.Some lawmakers have questioned whether the remaining revenue measures can raise enough money to pay for the investments. The legislation as of Tuesday was expected to include benefits such as an expansion of child care, a one-year extension of the enhanced child tax credit and universal pre-K, among others.Democrats have altered or cut core parts of their proposal to reduce the price tag. The party has scrapped provisions that would provide two years of free community college and encourage utility companies to transition to renewable energy.Lawmakers have scaled back a proposal to offer paid leave to most Americans to four weeks of benefits instead of 12. Democrats have also faced resistance over a plan to expand Medicare coverage to include dental, vision and hearing benefits.Senate Budget Committee Chair Bernie Sanders, I-Vt., has championed the Medicare proposal. He has also pushed to allow Medicare to negotiate prices directly with drug companies, which Democrats hope will both cut costs for consumers and save the government money that it can direct elsewhere.”Bottom line is that any reconciliation bill must include serious negotiations on the part of Medicare with the pharmaceutical industry, to lower the cost of prescription drugs,” Sanders said Tuesday. “That’s what the American people want. And a serious reconciliation bill must include expanding Medicare to cover dental, hearing aids and eyeglasses.”Pelosi on Tuesday warned Democrats that they will have to accept cuts to the package in order for any legislation to pass, according to NBC. She told House members to “embrace” the programs that will make it into the legislation.She said Democrats “are on the verge of something major – transformative, historic and bigger than anything else.”Subscribe to CNBC on YouTube.