Last week, negotiations between Democrats in Washington on their big social safety net bill were flailing. But suddenly this week, it looks like things are gelling.

“It’s been a very productive week for Democrats as we’ve inched closer to finalizing an agreement,” Senate Majority Leader Charles E. Schumer (D-N.Y.) said earlier this week. “I do think I’ll get a deal,” President Biden confidently predicted Thursday in a town hall. House Speaker Nancy Pelosi (D-Calif.) said Friday a deal is within reach.

Washington often can’t agree on anything until the last minute. So what deadline is suddenly moving Democrats to find a way forward?

There are a few.

On Halloween, a bunch of transportation programs will expire. A bipartisan infrastructure bill that already passed the Senate but is being held up by liberals in the House needs to get passed before thousands of federal employees who work in transportation could get furloughed. That would be a bad look for Democrats trying to project competence in governing.

But liberals have said they won’t vote for this bill until there’s a deal among Senate Democrats on what will be in the social safety net package that could get 50 votes. And one of those Senate holdouts is Kyrsten Sinema of Arizona, who negotiated the infrastructure legislation. Although extremely aggravating to Sinema, the pressure liberals are putting on her seems to be working. Once vague about what she would support in the social safety net legislation, Sinema appears to be sharing more specifics. Biden confirmed Thursday that she opposes raising corporate taxes to pay for the bill.

Congress still has some major fiscal issues to deal with. In September and October, Democrats were trying to negotiate this spending bill while getting a vote on the infrastructure bill while keeping the government open while avoiding a looming debt default. They decreased their workload by pushing the latter two off until December. That means in six weeks, Democrats have to figure out a way to pass another spending bill to keep the government open and to raise the debt ceiling over Republican objections. They would love to have a social safety net bill done before those big spending fights.

Voting rights legislation needs Democrats’ attention ASAP: In Thursday’s town hall in Baltimore, Biden heard from a Black voter who said this: “You received overwhelming support from the Black community, and rightfully so. But now many of us are disheartened.” This voter went on to cite a failed police reform deal and Democrats’ struggles to pass federal voting rights legislation. Black voters form the core of Biden’s base, and disillusionment with him is a growing problem for Biden. So Democrats desperately need to find a way to focus on voting rights legislation in particular. Biden essentially said that he will focus on that after this social safety net legislation is done, calling it a “regret” that he hasn’t yet.

“I have these three major pieces of legislation that are going to change the circumstances for working-class folks and African Americans as well that I have been busting my neck trying to pass,” Biden responded. “But what it’s done is prevented me from getting deeply up to my ears, which I’m going to do once this is done, in dealing with police brutality, dealing with the whole notion of, what are we going to do about voting rights?”

Lawmakers fear that voters are running out of patience with them the longer negotiations go on. “People are at risk of losing faith in government,” Rep. Elissa Slotkin (D-Mich.), a potentially vulnerable member of Congress, told Politico recently. And two widely respected Democratic strategists recently warned their party: “In 2020, Democrats won on a pledge of calm, capable leadership. That’s going to ring hollow if we can’t cut a deal inside our own party on two huge measures.”

A Quinnipiac University poll from early October found that 55 percent of voters disapprove of the way Biden is handling the economy, a major warning sign for Democrats. Democrats hope to turn that narrative on its head by passing a bill they say will make life more manageable for working-class Americans.

The midterm elections are almost here. At least when calculated in Congress-years. Control of Congress could flip from Democrats to Republicans in both chambers in the November 2022 midterm elections. That’s more than a year away, but by the start of 2022, lawmakers start battening down the hatches to get in campaign mode. And that makes significant dealmaking less likely.

The Virginia governor’s race really is here: Democrats could use a win before voters in this bellwether state choose a governor on Nov. 2. Even though Virginia hasn’t elected a Republican to statewide office in nearly a decade, Republican Glenn Youngkin is putting up a tough fight against Democrat Terry McAuliffe. Democrats would love — and arguably need — a big win in Washington to convey to Democratic-leaning voters that the party is worth keeping in power for the time being.