WASHINGTON – Profound differences between House and Senate Republicans may play as big a role as GOP fights with Democrats on how the legislative agenda plays out when Congress returns in January.

House Republicans, especially conservative members, have been energized by their ability to rally around the tax overhaul and to limit demands from Democrats — and from the Senate — on the stopgap spending measure that closed out the year and will keep the federal government running through Jan. 19.

House Speaker Paul Ryan has set his sights on another long-held GOP goal: reforming safety-net standbys such as Temporary Assistance for Needy Families and the Supplemental Nutrition Assistance Program, popularly known as welfare and food stamps, and used by millions of poor, disabled and elderly Americans. Ryan also spoke, on Dec. 6, of overhauling Medicare, calling it the "biggest entitlement."

But then there's the Senate, where Republicans will have the slimmest possible margin in 2018 and the chamber's rules give minority Democrats significant leverage. Majority Leader Mitch McConnell, recognizing that reality, shot down the idea of attempting to jam through GOP-only legislation.

"There's not much you can do on a partisan basis in the Senate with 52-48 or at 51-49, which would be the number of us for next year," McConnell said on Dec. 22. "… There are areas where I think we can get bipartisan agreement."

Republicans will hash out these differences at a retreat in January, after which they're expected to announce their legislative agenda for the months running up to the midterm elections in November. Before that, McConnell and Ryan will meet with President Donald Trump at Camp David.

McConnell says his agenda for early 2018 will be dominated by a drive to forge a broad spending deal for the rest of the fiscal year; a bipartisan measure loosening Dodd-Frank banking rules for smaller institutions; and an immigration overhaul if talks between Republicans and Democrats can reach an agreement.

He's all but rejected the idea of another attempt to repeal the Affordable Care Act or taking on reform of welfare programs or so-called entitlement programs like Medicare. McConnell said such attempts can only be successful when both parties agree — for example, as in the case of changes to Social Security made under President Ronald Reagan.

"The only way I would be willing to go to entitlement reform — I assume that's a euphemism for things like Social Security and Medicare — would be if there were Democratic support," McConnell told the Wall Street Journal.

This suggests McConnell recognizes how hard it would be to get 51 senators to agree on changes to programs that help people facing hardship — let alone on Social Security, which pays benefits to tens of millions of retired workers and their dependents, as well as to millions more disabled workers.

That means Republicans could need help from Democrats to fast-track passage with only a simple majority.

Ryan, on the other hand, and many of his House Republicans, see overhauling social programs as the essential next step after their rewrite of the U.S. tax code, which is forecast to drain some $1.5 trillion from federal tax revenue over the next decade. Ryan contends that reforming entitlement programs and increasing economic growth by lowering taxes are both necessary to pay off the federal debt.

As a candidate, Trump promised that he wouldn't cut Medicare or Social Security. Other safety-net programs may be fair game, though. The president said in November that "we're looking very strongly at welfare reform, and that'll all take place right after taxes." And Ryan has said that Republicans are making an impression on Trump when it comes to Medicare.

Mandatory spending on programs like Social Security, Medicare and Medicaid represents more than half of U.S. government outlays.

House Minority Leader Nancy Pelosi has made it clear she doesn't plan to help Republicans hunt for savings in those areas. Pelosi pushed back hard on the Republican fiscal argument of using the revenue lost to their massive tax cuts as an excuse to shrink the size of government.

"This is part of the 'starve the beast' value system that the Republicans have," Pelosi said on Dec. 21.

The ideological divisions are even more complicated when it comes to immigration, one of the first issues Congress has to tackle when it returns in the new year.

McConnell said on Dec. 20 that he'd commit to putting on the floor in January legislation combining deportation protections for 800,000 young undocumented immigrants with a border security ­package.

That's contingent, though, on bipartisan negotiations yielding a deal "that can be widely supported by both political parties and actually become law."