ANDRWEW MALCOLM: GOP infighting turns ominous for Trump and the GOP agenda.

Trump will get his Supreme Court nominee confirmed shortly, a major win. But the repeal retreat was a vivid lesson in how little control any GOP leaders maintain in 2017 over the energies and directions of the party rank-and-file. Trump benefited from that lack of cohesion last year to snatch the nomination, but now it works against him.

Within minutes of the pullback, Trump was talking up his next agenda item, tax reform. But hours later the rejected party leader resorted to Twitter to slam the 30 or so Freedom Caucus members who stood against the bill’s passage, professing allegiance to conservative principles.

Principled or petty, their stance left the Democrat ex-president’s namesake health-care measure fully in place after years of promised repeal.

“​Democrats are smiling in D.C.,” Trump tweeted, “that the Freedom Caucus, with the help of Club For Growth and Heritage, have saved Planned Parenthood & Ocare!”

He added: “The Freedom Caucus will hurt the entire Republican agenda if they don’t get on the team, & fast. We must fight them, & Dems, in 2018!”

A new president, even a Republican who conveniently adopted that party, barely two months in, threatening his own party members. That makes for fighting words. And emboldened caucus members responded in kind

The smart move might be to table ObamaCare repeal for now — it’s undoing itself all on its own — and let the GOP caucus and the White House work on an issue like tax reform with a greater chance of success, and give everyone a chance to rebuild (or just build) relationships.