The question has been gnawing away at the back of the mind since about 3am on 9 November, when the outcome of the US election become plain. The hysteria emanating from the Korean Peninsula drives it to the front of the mind. What happens if Donald Trump calls for the codes?

No president ever has. There were no codes in 1945. Harry Truman simply gave an order, and atomic bombs were dropped on two Japanese cities.

No president since has called for the codes – because of what Truman did. The neo-biblical devastation witnessed in Hiroshima and Nagasaki ensured the first-strike use of nuclear weapons was something no sane president would contemplate.

With a President whose sanity is in doubt, we face a danger no one saw coming. Nothing in the US Constitution, or beyond, is designed for a Commander-in-Chief with the capacity to take catastrophically impetuous decisions with incalculably cataclysmic consequences.

Trump, May and other world leaders condemn North Korea's nuclear test

A president is shackled domestically – and also, if less so, in foreign affairs – by a system created by geniuses to limit the damage any one citizen could inflict. But there were no nukes in the late 18th century, and the most colossal power any president has is a power without restraint.

If Kim Jong-un’s brinksmanship goads Trump beyond what endurance he has, technically there is nothing whatever to prevent him unleashing “fire and fury, and frankly power that the world has never seen”.

That threat of his against North Korea has not been a tremendous success. Since he made it, Kim has sent a missile over Japan, and underground tested a hydrogen bomb at least five times more destructive than the device that instantly vaporised 70,000 people in Hiroshima. More tests are imminent.

Where Teddy Roosevelt advocated a soft voice and a large stick, so far Trump has reversed that doctrine. He has screamed at Kim at volume 11 while carrying a twig suited to the alleged size of his hands.

So far, but how much further? For how long will as brittle and volatile a creature as this confine himself to empty threats while the portly dictator derides his manhood in the most potentially lethal round of geopolitical willy-waving since 1962?

Logic suggests the answer is indefinitely. While Trump is controlled by Generals Kelly, Mattis and McMaster, the troika who have executed a bloodless West Wing coup, the danger of a nuclear first strike against North Korea is virtually nil.

US Ambassador to the UN says Kim Jong-Un is begging for war

Even a conventional attack is unlikely. Seoul is close enough to the North Korean border, as Boris Johnson pointed out, for Kim’s conventional arsenal to kill millions of South Koreans in retaliation. For 30 years the finest military minds have war-gamed it, and not come up with a solution that doesn’t involve massive loss of life in both the Koreas, and possibly Japan.

But you may have noticed a paradox inherent in the above. Who has faith in logic in the context of Trump? This is a man who chooses this strategic moment to warn South Korea, a more essential US ally than ever, that he wants to withdraw from a trade pact; who threatens to stop all US trade with China – all of it – if the one power with any hope of reining in Kim’s galloping nuclear ambition continues trading with North Korea.

While that kind of nonsense can be shrugged off as the crazy old geezer shooting his mouth off again, it’s harder to be so sanguine about the ultimate menace.

What if Trump rebels against his generals? What if he sacks them and brings back Steve Bannon, or hires some other proselytiser of warfare as a cleansing agent?

In 90 seconds: North Korea and Kim Jong-Un

What if Kim deposits an unarmed intercontinental ballistic missile in the ocean a few miles off Guam? What if Trump is whipped up the next day by the apocalyptic ravings of InfoWars’ Alex Jones? What if Trump, paranoid and sleep-starved, tortured by his appalling approval ratings, is driven to a frenzy of impotent, little-man rage by Kim’s tauntings?

What if he snaps and storms down to the Situation Room in his gold-trimmed silken PJs at 4am, and demands the briefcase containing the codes (the “football”, as it’s reassuringly known)?

Technically, there is nothing at all to prevent him. Four minutes after the codes are input, the missiles leave their silos, subs, or aircraft. A few minutes later, Pyongyang is obliterated, and the world as we know it ends.

Non-technically, there is one failsafe. In the moments between him calling for and inputting the codes, a member of his secret service detail could shoot him. You want to assume this has been planned if such a scenario unfolds. But an act of treason on what Trump would know as an unpresidented scale is one hell of an assumption.

Loading....

That scenario remains incredibly unlikely. It relies not only a sequence of long shots, but on Trump being far crazier than even he seems to be.

Yet the fact that it is conceivable is so chilling that security of the planet demands it be rendered inconceivable. The world needs a 34th constitutional amendment removing the power to deploy nuclear weapons from the president alone; and placing it in the hands of a committee, military and civilian and preferably bipartisan, in which every member has a veto.