Siegfried S. Hecker was the director of the Los Alamos National Laboratory from 1986 to 1997 and is a senior fellow emeritus at the Center for International Security and Cooperation at Stanford University. Robert L. Carlin is a visiting scholar at the center.

It is a hair-raising fact that since 2001, North Korea has gone from zero nuclear weapons to an arsenal that is likely between 30 and 60. The common wisdom is that the efforts by the George W. Bush and Barack Obama administrations to halt the North’s nuclear program through diplomacy or sanctions were circumvented by the North’s repeated violations of diplomatic agreements. There is another way of looking at the problem, however, and that is what we have described in a study as “hinge points” — moments when bad decisions had bad consequences for U.S. national security. We are teetering on the edge of another such hinge point, perhaps the most serious yet. For that reason, it’s well worth looking more closely at what is at risk, how not to repeat previous flawed decisions and what a path through this perilous moment might look like.

By any measure, the U.S.-North Korea summit in Hanoi in February failed. For a month or so afterward, it looked as if that failure could lead to decisions on both sides that would reignite the tensions of 2017 when the North tested what was likely a hydrogen bomb and several intercontinental-range missiles and President Trump threatened North Korea with “fire and fury.” The clear danger following Hanoi was that by resuming testing, the North could perfect its ability to mate a nuclear warhead (in the worst case, an H-bomb) to an intercontinental ballistic missile capable of hitting the continental U.S.

In other words, Hanoi is not old news, receding in the rearview mirror. The potential for very negative consequences from the missteps at that meeting is still with us. As has happened several times over the past two decades, it remains possible that the U.S., having inadequately assessed the risks and benefits of accepting a less-than-perfect step with the North, could end up with North Korea possessing an even more menacing nuclear arsenal. The glib mantra quickly shared by both political parties in Washington after the summit — “a bad deal is better than no deal” — has served only to rationalize a bad decision.

Hinge points are not necessarily door-slamming moments. History shows there is usually an opportunity to recover. Until now, the tragedy has been that recovery meant admitting a mistake, and few governments are willing to do so. There are tentative signs that this time could be different. For a variety of reasons, neither Washington nor Pyongyang seem to want the negative outcome of Hanoi to be permanent, and both appear looking for ways to recover. The meeting between President Trump and North Korean leader Kim Jong-un in Panmunjom on June 30 — almost breathtaking in how it came together in a matter of a few days — looked to be a reflection of a shared search for recovery. That was hopeful but by itself clearly wasn’t going to move things where they need to be. It remains for both sides to reevaluate previous calculations and unambiguously signal a new approach through actions as well as words.

“As much as Washington, Pyongyang often misjudges timing, missing what are real but only fleeting windows of opportunity.”

The burden here falls on both sides. Perhaps the most fateful of the previous hinge points occurred in October 2002, when the Bush administration dealt a fatal blow to the 1994 Agreed Framework rather than work to correct its deficiencies. At that time, the North had no nuclear weapons and less than a few kilograms of plutonium, its plutonium production was frozen, it probably had no highly enriched uranium and only a fledging centrifuge program, and it was in its fourth year of a unilaterally declared missile launch moratorium, which limited its ability to expand the range and sophistication of its missiles. Washington’s excuse for walking away from the Agreed Framework was that Pyongyang was violating the agreement by clandestinely pursuing uranium enrichment.

Almost immediately, the U.S. paid a tremendous price. The North restarted its plutonium production facilities, built the bomb and accelerated its uranium centrifuge program. In effect, Washington had focused on a risk (uranium enrichment) that would take a decade to become a real threat instead of dealing with the much more dangerous threat of a plutonium bomb that took only a few years to develop and dramatically demonstrate with a nuclear test. Now, in fact, the U.S. faces both threats.

Over the ensuing 15 years, there were other hinge points that led to increasingly bad consequences. In February 2012, as Kim Jong-un took over from his father who had died two months before, Pyongyang and Washington struck a deal to stop nuclear and missile testing and suspend Yongbyon operations as well as allow international inspectors back into the facilities. The details were not well nailed down, however, and the poorly consummated “Leap Day Deal” collapsed when the North attempted another satellite launch in April as part of the celebrations of Kim Il-sung’s centennial.

Pyongyang claimed it had never agreed to halt satellite launches. Rather than try to salvage the other parts of the deal — primarily focused on the nuclear program — the Obama administration walked away and orchestrated United Nations Security Council sanctions. The North responded with its third nuclear test. It then expanded its uranium centrifuge operations and restarted its plutonium production reactor, which gave it more plutonium for its bomb program along with tritium, a requisite for hydrogen bombs.

Again in 2015, Washington passed up possible steps to limit the North’s nuclear program. During the next three years, the North conducted three more nuclear tests, including a likely hydrogen bomb with a yield exceeding 200 kilotons. It also conducted an unprecedented number and different types of missile launches, including three intercontinental ballistic missile-capable test flights. That’s where we sit today.

As much as Washington, Pyongyang also often misjudges timing, missing what are real but only fleeting windows of opportunity. The most obvious example was in 2000 when the North waited too long to send a senior official to Washington to follow up on major Clinton administration efforts to develop the scope and pace of the negotiations.

“Washington’s appetite for and interest in a deal seems to be diminishing the longer the North Koreans put off reengaging.”

Today, there is a window of opportunity, but it may be quickly closing. Pyongyang seems once again to be miscalculating timing. Washington’s appetite for and interest in a deal seems to be diminishing the longer the North Koreans put off reengaging. While understandable, ennui — whatever the cause — is not an especially good reason for fateful national security decisions.

It is going to take both sides to recognize the importance of the moment. On the U.S. side, that means not just the negotiators or the administration but also the broader foreign policy establishment and the political forces that will help shape the environment in which a far-reaching agreement will either be sustained or wither on the vine. It would be folly to prescribe the specific steps that will constitute a deal or even the first steps in a deal. However, there are broad outlines, at least on the U.S. side, to consider.

At Hanoi, the U.S. passed over the complete shuttering of the North’s Yongbyon nuclear complex as insufficient. The question is, compared to what? If the real choice is Yongbyon or Yongbyon plus something additional, that would be one thing. But if the choice turns out to be Yongbyon or nothing — that’s another hinge point, particularly since the North’s recent missile launches and Kim’s unveiling of new submarine construction shows that he has more options for an unfettered continuation of his nuclear program. Washington has made the wrong choice several times over the past 20 years. It cannot afford to do so again.