WASHINGTON — Last summer, President Donald Trump publicly pinned much of the blame for his administration’s woes on its communications efforts.

The White House and his broader administration could do better at communicating his agenda in one unified voice, he conceded in a Fox News interview, giving himself a “C or a C plus” on messaging.

But Trump’s leaked remarks during an immigration meeting Thursday calling Africa a bunch of “shithole countries,” coupled with his contradictory tweets that same day about a House bill authorizing foreign surveillance on U.S. soil, underscored his administration’s continued struggle with public messaging nearly one year into his presidency.

In using Twitter as a main vehicle for communicating — often unsupervised and free from the protocol that typically goes into official statements — Trump frequently undermines his staffers, contradicts their public statements and sends heated tweets that often derail efforts to stay on message.

Trump defends his use of Twitter, saying that it offers him a chance to communicate directly with the American people in an open and honest way. But the president, who often takes his cues from cable news — he frequently tags Fox News to his tweets — or from the last adviser to brief him, has proven that in many cases, his views are flexible and subject to influence.

The first year of his administration often saw conflicting messages on foreign policy matters from the White House and the State Department or the Department of Defense.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

On subjects from North Korea, to Russia, to the president’s surprise call for a ban on transgender people in the military last summer, Trump’s tendency to tweet his mind has blindsided advisers and, in some cases, complicated or even upended administration policy.

“Typically the idea is ‘let’s sit down, work through the statement and deliver the statement,’ but Trump will come out with an initial reaction and there’s an understanding that he might modify that,” said David Winston, Republican strategist and president of the Winston Group.

“There has gradually been an understanding among the electorate that the conclusion might be different,” Winston said.

Related: How a Trump tweet imperiled FISA surveillance legislation

On Thursday, Trump contradicted himself in a pair of tweets sent nearly three hours apart, initially indicating he had serious concerns with the surveillance program that he claimed “may have been used, with the help of the discredited and phony Dossier, to so badly surveil and abuse the Trump Campaign by the previous administration.” With the House about to vote on the reauthorization of the FISA program, his comments set off a flurry of confusion.

Nearly two hours later —after an intervention from Chief of Staff John Kelly, according to three officials — a second tweet added: “With that being said, I have personally directed the fix to the unmasking process since taking office and today’s vote is about foreign surveillance of foreign bad guys on foreign land. We need it! Get smart!”

The House, as expected, voted to reauthorize the program.

Despite the contradictory messages that at times have left the administration backtracking, some strategists say his approach to messaging has at least been consistent in its own way.

“Usually you have administrations that are consistent across the board, but this administration is wildly inconsistent,” said Rebecca Katz, a Democratic strategist and former aide to Senator Harry Reid of Nevada. “But his messaging has actually been pretty consistent. It’s buzzwords like ‘Make America Great Again,’ ‘Crooked Hillary’ or ‘Fake News’.”

Katz added that much of the politics gets “lost in translation” with the electorate but his catchphrase approach to communicating his agenda has been effective.

Trump has worked to rein in his communications shop, but the road has been long and bumpy. Press Secretary Sean Spicer abruptly resigned in July after revelations that Trump had brought on fellow firebrand Anthony Scaramucci to be White House communications director.

“The ship is going in the right direction,” Scaramucci told journalists at his one and only White House press conference. “I think we've got to just radio signal the direction very, very clearly. I like the team — let me rephrase that — I love the team.”

But Scaramucci had enemies at the White House, and his decision to go on record and blast top White House staffers in on record quotes laced with expletives and vulgarities led Trump to remove him from the position only 11 days later.

Trump also replaced his original chief of staff, Reince Priebus, with ret. Gen. John Kelly, hoping to instill some discipline in a White House gone rogue. But even as Kelly has worked to curb leaks and help get the various government departments on the same page as the White House, time has proven that Trump will tweet what he wants, when he wants.

Trump has long held the belief that he is his most effective spokesman and believes a sign of loyalty is having supporters and aides come to his defense. His tendency to lash out at political adversaries on Twitter has also sent an undeniable message that he takes a “with us or against us” approach to governing.

“While the messaging points about the president and his agenda are all over the place, his frame is the same,” Katz said. “In some ways, he’s doing a lot better than the Democrats who rolled out their message a few months ago and then we haven’t heard anything about it since.”