President Trump’s latest tweets on U.S. diplomacy with North Korea appear not only to undermine Rex Tillerson, his secretary of state, but also the nascent dialogue with Pyongyang over its nuclear and missile programs.

“I told Rex Tillerson, our wonderful Secretary of State, that he is wasting his time trying to negotiate with Little Rocket Man,” Trump said Sunday, referring to Kim Jong Un, the leader of North Korea. “Save your energy Rex, we’ll do what has to be done!”

One could say the president’s remarks Sunday are an unprecedented undermining of his own secretary of state. Except they are not. Trump has done this before, on several occasions: This summer, as Qatar was accused by its Arab neighbors of, among other things, supporting terrorism, Tillerson urged “Saudi Arabia, the United Arab Emirates, Bahrain, and Egypt to ease the blockade against Qatar” and urged Doha to be “responsive to the concerns of its neighbors.” Moments later, Trump, with Tillerson sitting in the front row, called Qatar “a funder of terrorism at a very high level,” stunning diplomats.

Tillerson had spent the early part of his tenure assuaging U.S. allies in NATO that the United States was still committed to the Atlantic alliance after Trump referred to the bloc as “obsolete,” and suggested that U.S. military support for its partners in the alliance was conditional upon their military spending. But in a speech to NATO in June, Trump failed to reaffirm Washington’s commitment to Article 5, the provision in the alliance’s charter that deals with collective defense. (He later did affirm it.)

On Iran, it looks likely Trump will decline this month to certify the nuclear deal reached between the Islamic republic and the international community. Tillerson and the rest of the U.S. foreign-policy establishment have said the deal isn’t perfect, but Iran is complying with it. (Tillerson has since hardened his position on the deal, seemingly making Trump’s decision all but certain.)

Then, of course, there is North Korea and Sunday’s tweets, the latest in a series of mixed messages from the president and his secretary of state. In August, amid repeated missile tests by North Korea and Trump’s threat to respond with “fire and fury,” Tillerson played up a diplomatic solution, saying “Americans should sleep well at night.” Just hours later, Trump tweeted that the U.S. nuclear arsenal “is now far stronger and more powerful than ever before....Hopefully we will never have to use this power, but there will never be a time that we are not the most powerful nation in the world!”

Trump’s seemingly off-the-cuff remarks on matters that demand delicate diplomacy have been compared to President Richard Nixon’s “madman theory,” in which the 37th American president wanted the nation’s enemies to believe he was insane and hence capable of anything. But as my colleague David Graham pointed out, because Trump has a history of not following through on his threats, “an equally likely—or even more likely—outcome is that North Korea will conclude that [he] is capable of nothing, based on past results.”

What the tweets will almost certainly do is undermine Tillerson and U.S. diplomatic efforts, given that they came a day after the secretary of state said in Beijing that the United States has “three channels open to Pyongyang.” Tillerson also said the U.S. was talking to North Korea “directly” and not through China, which the secretary of state is visiting to, among other things, shore up diplomacy on North Korea.

When senior foreign officials meet their cabinet-level counterparts from the United States, they like to know they are dealing with someone who has the president’s ear. It’s not quite clear whether Tillerson does. He has described his relationship with Trump as good, but news accounts suggest his influence in the White House is thin—and tweets like Sunday’s reinforce that narrative. Nikki Haley, the U.S. ambassador to the United Nations, has made the kinds of policy speeches normally given by the secretary of state, the official in charge of U.S. foreign policy, leading to speculation that she has her eye on his job. (Responding to those reports, Tillerson said: “We have a secretary of state currently, and I think he’s planning to hang around.”)

Personnel issues aside, Tillerson’s critics say that in the absence of strong U.S. leadership on foreign-policy issues, other countries, notably China and Russia, are trying to fill the void. That’s certainly true on North Korea, where China, by far its largest trade partner and its major political ally, has emerged as pivotal to any diplomatic solution. While the U.S. and China agree on the need for a denuclearized Korean Peninsula, their prescriptions of how to get there vary. Any resolution will almost certainly take those differences into account.

The tweets could also prompt the North Koreans who are talking directly with the United States to ask whether there’s any point to the endeavor. They are dealing with their own unpredictable leader, one prone to brutally executing rivals on a whim. If those efforts come to naught because the U.S. isn’t serious about them, they might ask, is North Korea right to pursue a nuclear and missile program as a deterrent?

There is, of course, the possibility that Trump perplexes the North Koreans into diplomacy. Until Trump took office, Pyongyang has been used to the traditional practice of diplomacy, and has reportedly sought meetings with Republican foreign-policy analysts to gauge what the president is thinking. American reporters who have recently visited the country also have said their North Korean interlocutors want to know if Trump wants war. That sort of unpredictability is exactly what proponents of the “madman theory” say will force North Korea to talk to the U.S., but as my colleague Kathy Gilsinan wrote, Kim himself is an unpredictable leader.

“When two leaders each habitually bluster and exaggerate,” Gilsinan wrote, “there’s a higher likelihood of making a catastrophic mistake based on a bad guess.”