Donald Trump’s presidency represents a real-time experiment in the durability of the U.S.-led international order — the norms, alliances and other arrangements put into place since World War II that have made this an age of unprecedented global growth and stability. It is equally a test of the national security decision-making process.

That system was created in the wake of World War II, as a means of bringing structure and discipline to U.S. policy. It has had its ups and downs over the decades, but has rarely been challenged as severely as during the Trump presidency. So far, Trump’s two longest-serving national security advisers — H.R. McMaster and John Bolton — have pursued very different approaches to decision-making under a decidedly undisciplined president. Their experiences show that American presidents ultimately get the decision-making system they want — but not necessarily the one they, and the country, need.

Prior to World War II, there were few mechanisms for coordination between the various departments involved in U.S. statecraft. During the war, President Franklin D. Roosevelt’s seemingly casual — but remarkably effective — approach to strategy and planning drove advisers like Secretary of War Henry Stimson to distraction.

FDR’s successes notwithstanding, by the early postwar era, most policymakers, diplomats and members of the foreign policy establishment agreed that a country with global responsibilities needed a more systematic approach to policy. That conclusion informed the creation of many of the institutions that still shape American policy today — the Department of Defense, the Joint Chiefs of Staff, the Central Intelligence Agency — as well as a National Security Council to oversee interagency deliberations and facilitate presidential decision-making.

In the subsequent decades, different presidents relied on this system to widely varying degrees. Some embraced it; others sought to ignore it. But since the late 1980s, after the Iran-Contra crisis demonstrated all too clearly the damage bad procedures could cause, administrations of both parties have generally accepted a system that features several levels of interagency debate and discussion on critical issues. And on the whole — plenty of glaring exceptions notwithstanding — America’s global performance has benefitted from the structure and rigor this process provides.

Enter Trump. For members of the foreign policy community, his election was worrying not simply because his views often seemed contrary to the patterns of American internationalism. It was troubling because a singularly impetuous president, often so ignorant of the details or even the broad outlines of American policy, was now in position to wield the many instruments of U.S. power.

From February 2017 to April 2018, McMaster sought to use a structured, disciplined decision-making process to compensate for the lack of those qualities in the president himself. McMaster used the NSC machinery, particularly the many interagency committees, to develop policy options and encourage systematic consideration of major issues. In concert with other members of the “axis of adults” — especially Secretary of Defense James Mattis and Secretary of State Rex Tillerson — McMaster also used the process to influence the president away from his own initial instincts.

Over the summer of 2017, a solid phalanx of advisers temporarily dissuaded Trump from getting out of the Iran nuclear deal. Similarly, they persuaded him not to withdraw from Afghanistan or tear up the North American Trade Agreement and the Korea-U.S. trade agreement. The president still followed his gut on issues such as withdrawing from the Paris climate change accords; there was still a high degree of confusion and even chaos in the White House. But for the year following Trump’s inauguration, process generally mitigated presidential disruption.

The critical failing of this system was that Trump hated it: He quickly came to resent a model that was widely seen as constraining him. By late 2017, the president was starting to seize control of policy on Iran and other issues. Over the course of 2018, he replaced much of his national security team, including firing McMaster and installing John Bolton that April.

Since taking office, Bolton has focused on empowering the president by disempowering the formal process. He has reportedly reduced the number of high-level interagency meetings in favor of smaller, less formal gatherings. He has pulled back authority from the departments and agencies by decreasing their access to information and the president.

After a failed effort to torpedo Trump’s first summit with North Korean leader Kim Jong Un in 2018, Bolton has largely refrained from trying to inhibit Trump’s instincts, or from imposing upon him a deliberate approach to policy that clashes with the president’s personality. “Different presidents have different ways of doing this,” Bolton has explained. “And if you insist on a particular formula as the only right way you get tuned out.”

The national security adviser is undoubtedly right that Trump deserves the decision-making system he wants. Indeed, this solicitude for the president’s preferred style is one reason Bolton has confounded early expectations that he might only last a few months in the job. Bolton has also used a less structured approach to pull Trump in his direction on key issues, such as the pressure campaign against Nicolas Maduro’s regime in Venezuela. The more difficult question is whether this system is actually good for American effectiveness in the world, or whether it is accentuating the effect of Trump’s less salutary characteristics on U.S. policy.

Just this year, the administration has leaned very far forward in confrontations with two undeniably bad actors — Iran and Venezuela — only for the president to discover that his maximalist objectives are not so easily achieved.

On North Korea, the left hand has sometimes not known what the right hand is doing: In June, Bolton denied that the administration was contemplating negotiating a mere freeze in (as opposed to the dismantlement of) Pyongyang’s nuclear program, when that State Department was apparently trying to achieve just that.

It has also proved hard to maintain priorities: An administration that earlier declared the primacy of great-power competition with Russia and China has spent much of the year embroiled in crises with rogue states and regional powers.

And even where the administration’s basic policy decisions are quite defensible — putting Huawei on the Commerce Department’s list of entities that could pose a national security risk, for example — an absence of advance coordination has sometimes left allies in the dark. Trump’s subsequent comments, indicating that the Huawei ban might be lifted as part of a U.S.-China trade deal, resulted in diplomatic whiplash and depleted the credibility of the U.S. stance. As policymaking has become less structured, policy has become sloppier and more scattered.

The price of sloppiness tends to increase in a crisis, moreover, and the Trump administration is now facing several actual or potential crises simultaneously: An increasingly fraught trade conflict with China; a potentially explosive showdown between Beijing and prodemocracy protestors in Hong Kong; rising tensions between India and Pakistan; and the still-dangerous state of affairs vis-a-vis Iran, among others.

This is precisely the situation in which a global superpower needs a shrewdly calculating president and a systematic approach to foreign policy. Unfortunately, the U.S. is lacking on both counts.

Bloomberg columnist Hal Brands is a professor at Johns Hopkins University’s School of Advanced International Studies.