German soldiers on the front lines during World War I. (Courtesy of the Library of Congress-National Audio-Visual Conservation Center)

When today’s historians look at the confrontation between the United States and North Korea, they’re likely to hear echoes of ultimatums, bluffs and botched messages that accompanied conflicts of the past, often with catastrophic consequences.

"The one thing that's certain when you choose war as a policy is that you don't know how it will end," says Mark Stoler, a diplomatic and military historian at the University of Vermont. This fog of uncertainty should be a caution for policymakers now in dealing with North Korea.

History teaches that wars often result from bellicose rhetoric and bad information. Sometimes leaders fail to act strongly enough to deter aggression, as at Munich in 1938. But more often, as in August 1914, conflict results from a cascade of errors that produces an outcome that no one would have wanted.

World War I is probably the clearest example of how miscalculation can produce a global disaster. As Stoler recounted to me in an interview, each player was caught in “the cult of the offensive,” believing that his nation’s aims could be fulfilled in a short war, at relatively low cost.

It was a tragic sequence: After the assassination of Archduke Franz Ferdinand, Austria asked for Germany's support against Serbia; Kaiser Wilhelm foolishly offered a "blank check." Russia, Serbia's ally, began mobilizing forces; Germany countered with its own mobilization, as did France, and then Britain.

In the nuclear age, the costs of miscalculation are much greater, but good sense (and luck) have prevailed, so far. Evan Thomas explains in "Ike's Bluff" that President Dwight D. Eisenhower appeared close to the brink in the Korean War in 1953. "If the Chinese and North Koreans failed to come to terms, American diplomats were to broadly hint, the United States would expand the war with nuclear weapons," he writes. Whether Eisenhower would have dropped the bomb is anyone's guess; amazingly, it's not clear his ominous messages were even passed on or understood.

Eisenhower played chicken again in 1958, when Soviet Premier Nikita Khrushchev gave him an ultimatum that the United States must remove its troops from Berlin. Ike promised his aides that he was "all in" against this threat. But soon after, he invited the Soviet leader to visit the United States, and after an intimate weekend with the president's grandchildren at his farm in Gettysburg, Khrushchev backed off.

The Cuban missile crisis is the ultimate moment of nuclear brinkmanship. But this story is murkier than it's sometimes described, says Philip Zelikow, co-author with Graham Allison of "Essence of Decision," the classic study of the event. President John F. Kennedy made an ultimatum to Khrushchev on Oct. 27, 1962, that averted war. But that was only after Khrushchev ignored a Sept. 13 warning against putting nuclear weapons in Cuba. Would Kennedy really have gone to war if Khrushchev hadn't backed down? He told a Navy commander later that he would have started combat operations on Oct. 30.

Modern history shows how wars are interwoven with promises and ultimatums, some honored and others ignored, Zelikow explains. Germany offered the 1916 "Sussex Pledge" that its submarines wouldn't attack American ships and then did so anyway, drawing the United States into war. China warned in 1965 that an American invasion of North Vietnam would bring Chinese intervention, and U.S. troops stayed below the demilitarized zone. America advised Iraq in 1991 that unless its troops left Kuwait, the United States would attack. The Iraqis didn't, and America did. And in a folly whose consequences persist to this day, America invaded Iraq in 2003 because of false intelligence that it had weapons of mass destruction.

How should we apply history to the current standoff with North Korea? First, messaging is critically important. With so much at stake, it's crazy for President Trump to be sending sensitive signals about war and peace in 140-character public tweets. Second, evidence suggests that North Korean leader Kim Jong Un is a genuinely dangerous risk-taker. U.S. officials calculate that he has conducted more than 80 missile or bomb tests since becoming ruler in 2011, compared with just 20 under his father.

Would the impulsive Kim ever be ready for negotiations with Trump? So far, he has spurned peace overtures from the United States, answering American calls for restraint with three more tests. North Korea claims he’s acting defensively, provoked by joint U.S. military exercises with South Korea last month.

Is Kim’s position a charade? Let’s find out. No new U.S.-South Korean exercises are scheduled until next March. That offers a six-month window to push Pyongyang to explore options. As history shows, the consequences of making a mistake in war are calamitous.

Read more from David Ignatius's archive, follow him on Twitter or subscribe to his updates on Facebook.