It’s hard to keep up—not just for the American people, who want and deserve to know where their country stands on critical relationships with the rest of the world, but for foreign friends and foes alike. Trump thinks this kind of inconsistency is an asset. It’s actually a problem. And it’s the right time to scrutinize just why it’s such a problem as Trump and his team sift through the results of his first foreign trip and determine where to take his administration’s foreign policy from here.

Trump views unpredictability as a strategy unto itself. “We must, as a nation, be more unpredictable,” he said as a candidate. “We have to be unpredictable, and we have to be unpredictable starting now.” Thus, the Trump doctrine: Keep ‘em guessing. Push NATO to the brink, and it’ll spend more on counterterrorism. Push Canada and Mexico to the brink, and they’ll renegotiate NAFTA on terms more favorable to the United States. And so on.

But while it may lack the melodrama and ratings Trump seems to crave, the merits of predictability—at least as a baseline—in foreign policy should not be underestimated, as we learned firsthand as national security officials at the State Department and National Security Council, respectively.

Predictability keeps friends close. From Europeans who knew they could count on American protection from the Soviets throughout the Cold War, to Japanese and South Koreans who have long relied on American backing against China and North Korea, confidence in the United States has ensured steadfast American alliances, consistent American military basing, and enduring freedom of navigation for American commerce. Such confidence has also made it less likely that insecurity will drive dangerous decisions, like pursuing weapons of mass destruction or accommodating countries that may be hostile to the United States.

Likewise, when we worked on addressing diverse terrorist threats from Libya to Somalia to Yemen, we found that ensuring our partners understood exactly what actions we would be taking, and what support we would be providing to them, facilitated consent that provided the legal basis for critical U.S. strikes against terrorist targets. At the same time, it also boosted host countries’ own willingness to increase their investment in dealing with threats emanating from their soil. For example, Libyan Prime Minister Fayiz al-Sarraj has publicly encouraged and supported counterterrorism operations by groups aligned with his Government of National Accord. The operations have cost scarce lives and resources but have had significant payoff for the Libyan people in expelling ISIS from strategic locations in Libya thanks to steadfast, reliable U.S. air support that also avoided civilian casualties.

And predictability keeps foes at bay. If an adversary like North Korea understands how its actions will affect U.S. behavior, then that adversary, if rational, can be deterred, much as the Soviet Union was deterred from escalating in various proxy battlefields during the Cold War. But if a country like North Korea—or Iran—simply finds U.S. foreign policy erratic and unpredictable, then why make decisions based on inscrutable U.S. reactions, rather than simply pursuing one’s own interests as aggressively as possible?