As a State Department official, I spent a decade negotiating and implementing a denuclearization agreement with North Korea. The 1994 Agreed Framework, a landmark denuclearization deal that collapsed in 2002, is now back in the news as critics of the new interim accord with Iran compare it to failed arrangements with Pyongyang, which they argue cheated on a succession of agreements in order to secure political and material benefits while continuing to build its nuclear capacity. For good measure, opponents note that the U.S. negotiator on the Iran deal, Wendy Sherman, was also involved in the Clinton administration's dealings with the North. The over-the top barrage by opponents of the Iran accord -- such as an opinion piece by the deputy editor of in the Wall Street Journal editorial page arguing that the deal is worse than Munich and the 1973 Paris Peace accords that "betrayed our Vietnamese ally" -- reminds me of attacks on the Agreed Framework in 1994, including Sen. John McCain's blasting of the deal as appeasement. Indeed, opponents have predictably dredged up the old bromides about Washington's past experience in dealing with Pyongyang as Exhibit A in their verbal assault. "Apparently America has not learned its lesson from 1994 when North Korea fooled the world," Republican Buck McKeon intoned in a statement. Another op-ed in the Wall Street Journal asserts that Iran is following North Korea's path, which "over the past two decades, has shown the world... how a rogue state can exploit over-eager western diplomacy." Unfortunately, the Obama administration's effort to counter these attacks has been just as historically uninformed as its critics. On Sunday, Secretary of State John Kerry rejected the comparison, arguing that Iran is a member of the Nuclear Non-Proliferation Treaty (NPT), has engaged in negotiations, is committed to daily inspections of certain facilities, and has publicly said that it will not build a nuclear weapon. His comments only fueled conservative commentators, who rightly pointed out that when the Agreed Framework was negotiated, North Korea was in fact still a member of the NPT (its announced intention to withdraw had been suspended), did engage in a negotiation, was committed to denuclearization, and did agree to allow inspections of key facilities. It's true that there are important lessons to be learned from our past difficulties with Pyongyang, but the opposition to the Iran deal represents a fundamental misreading of history. What really happened in 1994 is that Pyongyang abandoned a multi-billion dollar program that U.S. intelligence estimated could produce enough plutonium for almost 100 nuclear weapons. By the time the framework collapsed in 2002, the North could only build five bombs and had a pilot uranium-enrichment program that was not even close to producing bomb-making material. Over a decade later, the North has still not recovered from the setback imposed by the Agreed Framework, although its arsenal is poised to grow rapidly over the next few years. Critics also point to the material benefits North Korea received as part of the deal. Those benefits included about $500 million in heavy fuel oil shipments spread out over almost a decade, as well as concrete foundations for two reactors that were never completed and eventually abandoned. Pyongyang's discarded plutonium-production program, on the other hand, began in the 1960s, and by the time it ended three decades later, it had probably cost the North billions if not tens of billions of dollars. North Korea got the short end of the stick, not the United States. No one is interested in seeing arrangements with Iran suffer the same fate as the 1994 agreement, which ended when the United States discovered a small secret uranium-enrichment program in violation of the deal's terms. But the real lessons of the past have nothing to do with whether diplomacy is useful. If carefully crafted, agreements with rogue states -- even with North Korea -- can serve the national interests of the United States. Indeed, the history of dealing with Pyongyang highlights a number of potential landmines that the Obama administration will encounter -- and must avoid -- as it moves down the diplomatic road. First, the United States should avoid the "problem solved" mentality that inevitably follows landmark agreements. Once the 1994 accord was concluded, senior U.S. government officials paid a lot less attention to North Korea and a lot more to other foreign policy challenges. That is natural but, as a mid-level State Department civil servant, I was left to make sure that a denuclearization agreement including a multi-billion-dollar reactor construction project was properly implemented. Because of the lack of support from policymakers, deadlines were missed and Washington's credibility undermined, both with its allies and North Korea. Accords with Iran may not involve such large-scale undertakings, but they will still require constant vigilance by senior government officials. Second, without a thawing of bilateral political relations, nuclear deals ultimately fail. The two go hand in hand since countries build nuclear weapons in part to respond to a perceived security threat. U.S. negotiators included provisions in the 1994 accord for improving relations between Washington and Pyongyang but, unfortunately, failed to recognize that four decades of bad blood could not be erased overnight. Continuing periodic tensions between the United States and the North, as well as between Pyongyang and South Korea, our close ally, on issues unrelated to the nuclear agreement, undermined implementation. The same danger exists with Iran given its history of bad relations with Washington and Israel, as well as a raft of differences on other issues, such as support for terrorist groups. Third, plan for disputes and cheating. The Bush administration's response to North Korean cheating in 2002 -- dispatching a senior official to Pyongyang to demand the North come clean or else -- was hasty and not well thought out. When the North withdrew from the agreement and restarted its nuclear program, the administration had no alternative but to seek new nuclear negotiations. The lessons here for the Iran accords are clear. First, build in mechanisms for dispute resolution, through both existing diplomatic channels and a compliance commission created specifically for that purpose. Second, formulate a plan of political, economic, and even military steps that can be taken if problem-solving fails. Finally, domestic political buy-in is essential to ensure that agreements last. Faced with Republican opposition, the Clinton administration tried to finesse the problem by proposing severe constraints on its own funding for implementation. Directly confronting Republicans might have risked scuttling the agreement, but this indirect approach left festering resentments that eventually created serious problems for following through on its commitments. The Obama administration may face a similar dilemma on Iran, although Congress's active role in imposing sanctions will probably make it impossible to finesse the issue. While the limited tranche of sanctions lifted in the interim deal can be accomplished by the White House alone, lifting the more extensive remaining web of sanctions as part of a final deal will likely require congressional involvement, if only because of political considerations. Understanding the real lessons of past agreements with North Korea, and not buying into the historical fiction purveyed by opponents, will only strengthen the Obama administration's effort to resolve the Iranian nuclear challenge. As the saying goes, "those who can't remember history are condemned to repeat it." Conservative critics would do well to get their facts straight.