Until the new Congress is sworn in, Republicans are still operating with a slim two-seat majority in the Senate and an advantage of more than 40 seats in the House. The GOP will have at least two additional Senate seats in January after Tuesday’s elections, but Democrats are lined up to have a significant majority in the lower chamber.

“Yes, we have a better situation in the Senate in the new year, but we have a worse situation in the House,” said Republican strategist Ford O’Connell.

Congressional leaders on both sides acknowledge they have much on their agenda for their lame-duck session and not a whole lot of time to get it all done.

“I think it will be a relatively lively lame duck,” Senate Majority Leader Mitch McConnell, R-Ky., told The Associated Press last month. “Sometimes they just sort of go to sleep after the election. But we have too much left to do to have a quiet lame duck.”

One issue that will need to be dealt with one way or another is keeping the whole government open past Dec. 7. Lawmakers already passed about half of the appropriation bills they need to fund the government for 2019, but other departments—including Transportation, Housing and Urban Development, State, Interior, Agriculture, Treasury, Commerce, Homeland Security, and Justice—are due to run out of money unless new funding bills are passed.

President Trump has demanded the Homeland Security budget include funds for a southern border wall, one of his signature campaign promises. Trump has repeatedly threatened to shut down the government over border security, but Republican leaders convinced him to delay that fight until after the midterm elections.

Trump has spoken recently of seeking full funding for the wall, but the White House only requested $1.6 billion for 2019, which is what the Senate version of the DHS appropriations bill contains. The House version includes $5 billion, but Trump has indicated he wants even more.

“We need the money to build the wall — the whole wall — not pieces of it all over. And we are doing it,” he told reporters Wednesday.

Despite Trump’s confidence, Democrats believe their victories in the House lend them additional leverage in negotiations.

“Why would we compromise on the wall now?” House Minority Leader and probable future Speaker Nancy Pelosi, D-Calif., said in an interview with The Wall Street Journal earlier this week, though she added there are bipartisan ways to secure the border she supports.

The two sides have come close to a deal before involving the border wall and the so-called Dreamers who were protected under the Deferred Action for Childhood Arrivals program. Trump attempted to end that program by executive order, but the issue remains mired in lawsuits.

Earlier this year, according to The Washington Post, the White House proposed three years of protection for the 700,000 already enrolled in the DACA program in exchange for $25 billion for the wall. Democrats countered with a plan that would have allowed a pathway to citizenship for the broader dreamer population of 1.8 million immigrants. Trump rejected that deal unless it also included controversial changes to legal immigration programs.

“Democrats have no incentive to agree to funding that they have steadfastly oppose except in the context of a broader immigration policy agreement,” said Richard Arenberg, who worked on Capitol Hill for decades and co-authored “Defending the Filibuster: Soul of the Senate.”. “They will doubt that Republicans will be willing to cause a shutdown.”

Republicans will not be on a ballot again until 2020, and Trump will be up for re-election with them then so the political environment will be very different.

“They’ve already lost the House. It’s all going to be tied back to a presidential election anyway,” O’Connell said.

Past shutdowns suggest there might be longer-term consequences for both parties.

“These things have a way of spinning out of control and those who think they are going to benefit from them often don’t,” said Robert Mann, a former Senate press secretary and a professor at Louisiana State University.

This is especially true for Democrats who are trying to convince the public they can be the adults in the room if they are given power.

“Better to cut a deal with Trump and solve DACA that engineer or participate in causing a shutdown. Giving Trump the money for his wall is awful, especially if Democrats get nothing in return,” Mann said. “But supporting a shutdown is worse and could make it much harder to get anything done in 2019.”

Trump intimated Wednesday he has no desire to revisit the DACA issue as long as litigation over his attempts to end the program is ongoing. A federal appeals court Thursday ruled the administration must continue the program, but the Department of Justice has asked the Supreme Court to fast-track three cases involving DACA.

“I think we could really do something having to do with DACA,” Trump said Wednesday. “And what really happened with DACA — we could have done some pretty good work on DACA. But a judge ruled that DACA was okay. Had the judge not ruled that way, I think we would have made a deal. Once the judge ruled that way, the Democrats didn’t want to talk anymore. So, we’ll see how it works out at the Supreme Court.”

Beyond the basic task of keeping the government open, lawmakers are also racing to craft a compromise on the five-year farm bill, which has been stalled in conference as House and Senate staff struggle to reconcile differences between the versions they passed. Agriculture groups fear the months of work already done on the bill will be tossed aside if it is not passed before power changes hands in the House in January, leading to further delays.

“If you’re the Republicans, you want to get any possible big-ticket item through now and try to navigate this gauntlet versus when Nancy Pelosi is going to have the gavel in her hand,” O’Connell said.

The primary sticking point on that bill is work requirements for those receiving food stamps, something House conservatives and the president have demanded but Senate Democrats adamantly oppose.

Other legislation that has languished amid conflicts between the two chambers could find its way onto the docket, including a criminal justice reform bill championed by Trump adviser and son-in-law Jared Kushner has championed and an effort to overhaul Capitol Hill’s handling of sexual harassment complaints. Senate Republicans aim to advance numerous judicial and political nominations before the end of the year too.

One thing that seems almost certain to fall by the wayside is the middle-class tax cut President Trump claimed was imminent last month. No legislative text has been produced, and Trump acknowledged Wednesday he does not have the votes to pass it anyway.

Researchers at George Mason University’s Mercatus Center analyzed more than 52,000 roll call votes from 1939 to 2014 to determine whether lawmakers behave differently during lame-duck sessions. In a 2016 report, research fellows Christopher Koopman, Mathew Mitchell, and Emily Hamilton found few reasons to expect lawmakers to find common ground on contentious issues in the weeks ahead.

“During a lame-duck session, members are slightly less likely to side with their own parties and less likely to vote at all,” they wrote. “These patterns persist in very lame duck sessions—those that take place following the loss of majority status within a single house. In these sessions, however, a new pattern emerges: senators become less likely to cast bipartisan votes.”

The Mercatus Center identified four major reasons why outgoing lawmakers might behave differently during a lame-duck session. They may feel less beholden to the will of the constituents who voted them out of office and their party leaders, and they may experience less pressure from special interest groups. At the same time, they may be looking to advance the interests of their own future employers.

The effects of the lame-duck session on voting are measurable but not enormous. In both chambers, members typically vote with their party about 80 percent of a time. In a lame-duck, party unity slips by about 3 percentage points. In very lame-duck sessions, unity is even lower and the Senate is 14 percent less likely to pass something on a bipartisan basis.

“Lame-duck sessions seem to make members more independent,” the researchers wrote. “During a lame-duck session, members are less likely to vote at all, and when they do vote, they are less inclined to follow the wishes of their party or their constituents.”

Future career prospects may be a particular concern for outgoing House Republicans, many of them young, who are considering defying a vindictive president who is wildly popular with their base on their way out the door.

“Some will be seeking a Washington lobbying position and will want to preserve relationships with Republican leadership and the White House for the future,” said Arenberg, who now teaches at Brown University. “Other might be seeking appointment to positions in the administration. Others could be seeking to protect a future in elective office, either running top regain their seat or for state office.”

If soon-to-be-retired Republicans are debating whether to side with President Trump on shuttering the government, his response to the election results may not be helping his case.

“Carlos Curbelo; Mike Coffman — too bad, Mike; Mia Love. I saw Mia Love. She’d call me all the time to help her with a hostage situation. Being held hostage in Venezuela. But Mia Love gave me no love, and she lost. Too bad. Sorry about that, Mia,” Trump said at Wednesday’s press conference. “And Barbara Comstock was another one. I mean, I think she could have run that race, but she didn’t want to have any embrace.”

Some outgoing GOP members have rejected that explanation for their losses. Curbelo observed that he outperformed Republican Senate candidate Rick Scott and gubernatorial candidate Ron DeSantis, both close Trump allies, in his southern Florida district.

“To deal w harassment & filth spewed at GOP MOC’s in tough seats every day for 2 yrs, bc of POTUS; to bite ur lip more times you’d care to; to disagree & separate from POTUS on principle & civility in ur campaign; to lose bc of POTUS & have him piss on u. Angers me to my core,” tweeted Rep. Ryan Costello of Pennsylvania.

Arenberg said Trump’s attacks on GOP incumbents whose votes he will need to pass anything during a lame-duck session are pointless at best and counterproductive at worst. However, Mann noted the president has rarely faced consequences before for picking fights within his own party.

“From what I’ve observed over the past two years, Trump’s insults work more often than they fail. I guess it depends on how many of these outgoing members really think they want to stay around and lobby or run for another office back home,” Mann said.