President Obama left Washington on Friday for a lengthy holiday vacation in Hawaii, as if the beating he and the Democrats absorbed last month was of no particular consequence to him. Life could be different when he returns in January.

Obama closed out the year with a news conference performance that gave no hint that he was suffering from the Republican takeover of the Senate, its expanded majority in the House and its continuing march to power in the states.

During the nearly hour-long session with reporters, he took a swipe at Sony Pictures for withholding release of the movie “The Interview” after a cyberattack reportedly by North Korea. With the reporters, he was playful, jaunty and clearly feeling in command. Why not, he might ask? From his perspective, he had managed to take a huge election defeat and turn it into a successful December — and not for the first time.

The prequel took place four years ago, in December 2010, after Democrats had lost 63 House seats and control of that chamber in one of the biggest midterm defeats in decades. In the subsequent lame-duck session, the president scored a series of victories, closing out that bad year on an unexpected high note.

He began that lame-duck session by cutting a quick deal, thanks to Vice President Biden and Senate Republican leader Mitch McConnell (R-Ky.), to extend the Bush-era tax cuts over the objection of many in his party (but with the vital support of Bill Clinton).

He later won ratification, against the odds, for the New Strategic Arms Reduction Treaty with Russia. He won passage, against perhaps even greater odds, of the measure repealing the Clinton-era “Don’t Ask, Don’t Tell” policy that prohibited gays from serving openly in the military.

When he left for Hawaii at the end of 2010, he was, as one adviser later told me, “as happy as I’ve ever seen him.” He even extended his vacation an extra day before returning to confront the new House GOP majority. “He knew he was stepping back into a new world,” the adviser said.

This year’s lame-duck session was not so productive, but the White House managed victories nonetheless. The omnibus spending bill included provisions that rankled liberals, but the Obama White House, preferring to avoid a fight that risked a government shutdown, pushed congressional Democrats to swallow their objections and support it. Senate Majority Leader Harry M. Reid (D-Nev.) then used the last days of his powers to push through a sleigh full of judicial and executive branch appointments.

Meanwhile, the president, who vowed at the beginning of this year to use his pen and a phone to act in the absence of action in Congress, exercised those powers to seize the initiative on two blockbuster issues.

The first move had been long signaled. Obama rewrote immigration policy with action that will protect millions of illegal immigrants from the threat of deportation. The decision was a slap at congressional Republicans, who had warned that the move would poison their relationship with the president — and who had held up immigration reform in the House for 18 months.

An even more startling step came last week when Obama announced an end to a half-century policy of isolating Cuba .

At the same time, the economy continued to add a substantial number of jobs, and declining world oil prices were putting more cash in the pockets of American consumers just in time for the holidays.

Four years ago, Obama left for Hawaii with a false sense of confidence that he and the new Republican majority in the House might be able to work together productively. Instead, the two sides clashed repeatedly over spending and the debt, leading to the debacle over raising the debt ceiling in the summer of 2011.

That sobering moment changed Obama. He might say he is prepared to work with Congress where possible, and that is still probably a genuine expression. But he long ago gave up believing there was much the two sides might do together. Conflicts over the past two years have no doubt reinforced his belief that there isn’t much room for agreement with congressional Republicans.

Obama has grown more assertive in acting unilaterally. He’s done it on climate change repeatedly, just as he’s now done it on immigration and relations with Cuba. While limited in what he can do without the approval of Congress, he is moving as swiftly as he can to implement the liberal agenda that his coalition long has advocated.

What awaits the president when he returns to a Congress now fully in Republican hands is the question. There are some areas of possible agreement, including trade, where Obama would have to join a majority of Republicans over the opposition of many in his own party.

What opportunities exist for bipartisan agreement in other areas — broader tax reform or entitlements changes, for example — aren’t very clear and won’t be until the new Congress gets to work. But a president who has developed few real relationships on Capitol Hill will be tested once again to demonstrate whether he is prepared to do the hard work of legislating.

Obama’s political team has long believed that the unilateral actions he is taking will reinforce support within the coalition that has twice elected him — a coalition they see as expanding over time due to demographic changes. His actions, they hope, will put Republicans in an uncomfortable position politically.

There are risks to all this. He is still in a weakened position. The latest Washington Post-ABC News poll, taken before the action on Cuba, puts his overall approval rating at an unimpressive 41 percent, in the range where it’s been stuck for most of 2014. His economic approval is only slightly better: 44 percent.

Although his immigration approval rating is a meager 38 percent, it has risen since last summer, when the flood of children at the border sparked another crisis and debate. The survey also showed that a bare majority approves of his executive action protecting undocumented immigrants from deportation threats — although a bare majority also said he had exceeded his authority in doing so.

Obama will return in January to a capital more divided than at any time during his presidency. He will have to make choices about how much he will try to work with the new Congress vs. how much he will continue to hector Republicans by taking executive actions over their voiced opposition. He may have left town feeling good, but the next two years will be anything but easy.