WASHINGTON — The only strategy for congressional Republicans tougher than opposing President Donald Trump's policies may be supporting them — if only because figuring out which position they're supposed to back at any given moment is enough to stump any would-be ally.

Time and again, GOP members have found that embracing the president's view one day could mean waking up on the opposite side the next. Now, that pattern has this week's painstakingly negotiated Hill agenda in limbo.

The White House was directly involved as House Republicans negotiated for two weeks over an immigration deal. White House legislative adviser Marc Short attended a closed-door meeting with them, and White House senior policy adviser Stephen Miller, an immigration hard-liner, collaborated with negotiators.

Speaker Paul Ryan, R-Wis., told members that he had spoken to Trump about the strategy and that the president was excited about it. Congressional Republicans, said the speaker, had been "working hand in glove with the administration on this." The overwhelming objective: make sure they didn't send the president a measure he wouldn't support.

But on Friday, the morning after GOP leaders released the text of a compromise immigration bill that would provide a path to citizenship for so-called Dreamers and funding for a border wall, as well as address the controversial policy of separating children and parents at the border, Trump had a surprise for the Republicans who crafted the measure: In an unscheduled appearance, he said that even if it were to pass, he wouldn't sign it into law.

"The Democrats are forcing the breakup of families at the Border with their horrible and cruel legislative agenda," he tweeted later, as confused Republicans scrambled to salvage the strategy. "Any Immigration Bill MUST HAVE full funding for the Wall, end Catch & Release, Visa Lottery and Chain, and go to Merit Based Immigration. Go for it! WIN!"

Trump didn't note it, but the compromise he had rejected earlier in the day included each of the elements he listed as essential. The White House spent much of the day arguing that the president had just indicated his support for the bill.

But that wasn't enough for wary Republicans on the Hill, where rounding up support ground to a halt as members said they were waiting to hear from the president himself. Later this week, ahead of the expected vote on a pair of immigration bills, they will — Trump now plans to meet with the GOP conference Tuesday night to discuss the issue. In the meantime, the fate of the compromise hangs in the balance.

The president's strategy on many issues is to sow confusion, said Lara Brown, director of George Washington University's Graduate School of Political Management. That tactic might work for a chief executive, she added — but it isn't ideal for a commander in chief and effective head of a political party. For those looking to align themselves with Trump, "it creates, I think, not just embarrassment but also resentment among fellow partisans who are trying to essentially support whatever the president's decision is," she said.

The seeming about-face on immigration isn't the first time Republicans have followed their leader, only to find him suddenly marching in the opposite direction.

Soon after Trump abruptly announced last month that he was backing out of the planned June 12 summit with North Korea, congressional Republicans said the president had made the right call and commended him for "seeing through Kim Jong Un's fraud."

"I think President Trump was right in walking away from a summit that clearly was not going to be about denuclearization," said Sen. Cory Gardner of Colorado, the head of the Senate Republicans' campaign arm.

Sen. Marco Rubio, R-Fla., said he "100 percent" supported Trump's decision. "For two weeks now, North Korean tyrant Kim Jong Un has been trying to sabotage the summit and set the United States up to take the blame ... ," he said in a statement. "If other leaders in North Korea want a better future, they should get rid of Kim Jong Un as soon as possible."

Less than a week later, the Republicans backing Trump's decision to walk away found themselves effectively standing alone, as the administration revealed that it was "actively" preparing for the summit after all — and the president's tone on North Korea's leader again turned positive.

The Trump White House, GOP members have found, isn't always a reliable resource for figuring out what Trump in the Oval Office is thinking.

Last year, the White House — deeply involved in prolonged negotiations over a legislative package to fund the government for the rest of the fiscal year — helped finalize a deal in March with congressional leaders. As the House and the Senate geared up to vote on the measure, the White House issued a formal statement of support. Early the next morning, 25 Republicans joined with most Democrats in the Senate to pass the bill, 65-32.

"I am just very excited that the president fulfilled a campaign promise to set aside sequestration cuts and to rebuild the military," Sen. Lindsey Graham, R-S.C., said in a TV interview after the vote. Other Republicans issued similar statements praising the funds it would provide for national security, health research, veterans and the opioid epidemic.

But one person wasn't thrilled with the bill the president's supporters were spinning as an administration achievement: the president himself. Hours after the bill passed, Trump threatened to veto it, amid an outcry from conservatives critical of the price tag. He eventually signed the measure — with a public vow that he wouldn't sign such a bill again.

Former Rep. David Jolly, R-Fla., who served in the House from 2014 to 2017, said the top priority for most Republicans isn't to make sure the president's position is a consistent one — it's just to figure out what that position might be and making sure they share it.

"In today's Republican Party, the No. 1 test for many Republicans is, 'Are you loyal to the president?'" Jolly said. "And I think there's less consequence of saying, 'When the president changed his mind, I changed my mind with him.' That, in the Republican Party, makes you a loyal Trump foot soldier."

Many Republican lawmakers seem to have adjusted their approach to accommodate Trump's uncommon unpredictability, tending to withhold comment or support until it appears he has taken some sort of public action.

"I think everyone in Washington, and this includes members of Congress, has learned to simply answer with his phrase ... 'We'll see,'" Brown said.

In the wake of the Parkland, Florida, school shooting in February, Trump supported raising the age to buy a gun from 18 to 21. He even ridiculed a member of his own party, Sen. Pat Toomey of Pennsylvania, who tried to revive a gun restrictions bill, for not including a provision to set a minimum age for buying a rifle.

"You know why? Because you're afraid of the NRA," Trump told Toomey and his co-sponsor, Sen. Joe Manchin, D-W.Va., as cameras rolled at a White House meeting.

Ronna McDaniel, chairwoman of the Republican National Committee, even told the conservative Washington Examiner that raising the minimum age for purchase of the weapon to 21 was "on the table."

Until the president himself slipped into what appeared to be a permanent wait-and-see mode himself.

"On 18 to 21 Age Limits, watching court cases and rulings before acting," Trump tweeted a few weeks later. "States are making this decision. Things are moving rapidly on this, but not much political support (to put it mildly)."

Even a live televised statement provides little guarantee that a presidential position has any staying power. At a White House immigration meeting earlier this year observed in part by the presidential press pool, Sen. Dianne Feinstein, D-Calif., asked Trump whether he would sign a bill designed solely to address the legal status of participants in the Deferred Action for Childhood Arrivals program, or DACA, rather than one that tied action on that front to movement in other areas of immigration policy. "Yeah, I would like to do it," Trump said.

A day later, Trump stated that he wouldn't: A DACA bill, he said, would have to include funding for his proposed wall along the U.S.-Mexico border.

Last fall, Trump similarly endorsed a bipartisan deal to stabilize the health insurance markets and restore Obamacare subsidies that he had canceled — until he didn't.

Whatever they may say behind closed doors, most of the Republican majority hasn't offered much by way of public complaints — instead, many members seem to be expressing their dissatisfaction with their feet. Both Jolly and Brown say Trump's frequent policy vacillations may be a major factor driving the wave of Republican retirements, with dozens of GOP members announcing plans to exit Congress this year.

"I would argue that the sheer volume of retirements is partly about the environment that Trump has created for the Republican Party," Brown said. "It's not just about tenor and tone — it's also the frustration around how do you actually work in this sort of environment where the primary answer is 'we'll see' and 'I'm the only one who knows anything.'"