The new decade is about to start under many shadows, but none is more ominous than North Korea’s threat to return to nuclear and long-range missile tests after a two-year lull.

Pyongyang’s pendulum swing from enthusiastic summit diplomacy back to name-calling and threats comes as Donald Trump is increasingly focused on his re-election campaign.

That may be a good thing, as the US president will be wary of provoking a crisis to spoil his narrative of peace and prosperity.

Or it could be a very bad thing: Kim Jong-un could seek to exploit a moment of maximum leverage and miscalculate.

The last time there was a standoff, Trump and Kim took to brandishing their nuclear buttons (the US president boasted his was bigger and more functional). According to a new account of events during the crisis in 2017, Trump stunned his aides by calling for the entire 25-million population of Seoul to be moved further away from the border with the North so they would not be held hostage to Pyongyang’s fearsome artillery.

He also ordered US military families to be evacuated from South Korea – despite being told that such a move would probably be seen by the North Koreans as the precursor for an attack.

The order was quietly killed by the then defence secretary, James Mattis. But Mattis resigned a year ago, stripping the administration of an important restraining influence. It is less likely his successor, Mark Esper, would ignore such a direct order.

With the departure of the supposed “adults in the room” Trump is less constrained in his conduct towards the world, dispensing with advice altogether and trusting his gut. The once-lumbering process by which national security decisions were debated and agreed in the past has been hollowed out.

Decisions tend to come direct from the president’s thumbs through Twitter – often as a surprise to his own top officials.

Over the course of 2019, Trump’s foreign policy has become ever more personalised and consequently both transactional and erratic, swerving wildly with the president’s mood swings, foreign influence and second thoughts.

Kim Jong-un waves from his train as he arrives at the railway station in Vietnam, for a meeting with Donald Trump. Photograph: Minh Hoang/AP

In their second summit in Hanoi in February, Trump tried jolting Kim into disarmament with a surprise proposal. US and North Korean diplomats had been discussing a phased agreement in which each step towards Pyongyang’s disarmament would be met by a proportional lifting of sanctions. At the summit, Trump presented the North Korean leader with an all-for-all deal – total disarmament.

It was the sort of gambit that may have thrown competitors off balance in the real estate market, but not a paranoid dictator in possession of a nuclear arsenal. The talks collapsed and relations have been sliding downward ever since. The US national security staff are spending the holiday braced for the “Christmas gift” Pyongyang has threatened to send, with a long-range missile test thought the most likely seasonal surprise.

Syria

In Syria, the president’s abrupt change of mind caused whiplash for soldiers on the ground. Following a 6 October phone conversation with Recep Tayyip Erdoğan, in which the Turkish president appears to have convinced him to let Ankara take the lead in the military campaign against Isis, Trump ordered all US troops out of the country, without consulting the Pentagon or US allies.

Within a day, special forces were ordered to vacate their outposts on the Turkish-Syrian border, abandoning the Kurdish allies who had taken the brunt of the fight with Isis, at the cost of 11,000 deaths in their ranks. Two weeks later, however, Trump was trying to rein Turkey back, firing off one of the stranger presidential missives in history in which he implored Erdoğan: “Don’t be a tough guy. Don’t be a fool.”

At the same time, US troops were ordered back into Syria, with the mission – in Trump’s words – to “secure the oil”.

Extracting the resources of another country would be a potential war crime, and Pentagon officials sought to interpret the president’s diktat in a more benign manner, as part of a counter-terrorist campaign to prevent oil installations falling under Isis control, and as a mandate for US commanders to continue their collaboration with the Syrian Kurds.

There are no guarantees on how long this new equilibrium will remain. Erdoğan sees the Kurds as direct threat, and will use any leverage he has on Trump to get him to cut them loose.

Donald Trump and Turkey’s presiden,t Recep Tayyip Erdoğan, at the Nato summit in the UK on 4 December. Photograph: Peter Nicholls/Pool/AFP via Getty Images

Afghanistan

In Afghanistan, there were two U-turns. The US envoy, Zalmay Khalilzad, spent nearly a year leading direct talks with the Taliban, much to the unease of the government in Kabul. But in early September, when an agreement looked imminent, Trump suddenly declared the negotiations “dead”, canceling what he had intended as a surprise Camp David meeting with the Taliban, in the wake of an attack in the Afghan capital. The decision took all concerned by surprise, as both sides had fought and talked at the same time at different phases of the 18-year war.

But less than three months on, on the occasion of Trump’s first visit to the country, he declared the talks back on. It was unclear what, if anything, had changed his views.

In possibly the most dramatic about-face of all, Trump gave a green light to airstrikes against Iran following the downing of a US drone in June but changed his mind with 10 minutes to spare, when warplanes were already in the air, declaring he had been motivated by a desire to avoid casualties, though he had been briefed on the estimated death tolls before ordering the attacks in the first place.

In this and other war-or-peace decisions, the underlying thought process is obscure or perhaps not there at all. The term “foreign policy” may no longer be a useful way of describing what is going on, suggesting as it does a sustained coordinated effort towards a national security goal.

Business

Some policy endures in the muscle memory of the state department and the Pentagon, but there are no guarantees it will ultimately determine what the US does. When established policy clashes with the interests of the president, his family and their business concerns, it usually loses.

Such a conflict is, after all, what is at the core of the Ukraine scandal that led to Trump’s 18 December impeachment. The formal goal of US foreign policy was to support the new government in Kyiv in its fight to push back Russian military encroachment, but Trump jammed his foot on the brake, turning US official support into leverage for extracting kompromat on his domestic political rivals.

The White House has also intervened to try to stop punitive measures against Russia, Saudi Arabia and Turkey for reasons that were left obscure. The business empires of Trump’s extended family have dealings with all those countries, as well as Israel and China. The president’s son-in-law Jared Kushner, was supposed to be devising an Israel-Palestinian deal at the same time the Kushner family firm was borrowing money from Israeli financial institutions. Beijing has meanwhile been assiduous in issuing patents to Ivanka Trump, at a time it was negotiating a trade deal with Washington.

Personal vanity has been as much a wild card as vested financial interests, and arguably more so. It appears to have been the driving force behind Trump’s determination to destroy the legacy of his predecessors and replace it with his own, for its own sake.

Vast amounts of administration and congressional effort were devoted to ripping up the Nafta free trade agreement with Mexico and Canada, to replace it with the very similar USMCA deal that Trump claims as a personal triumph.

Other agreements have been destroyed with no replacement. In the 19 months since the US abrogation of the multilateral nuclear deal with Iran, Barack Obama’s signature foreign policy achievement, the campaign of “maximum pressure” on Tehran has yielded no new negotiations with Tehran, let alone a successor agreement.

Activists wear masks of Donald Trump and Vladimir Putin holding mock nuclear missiles as they demonstrate against the ending of the Intermediate-Range Nuclear Forces Treaty (INF) in front of the American Embassy in Berlin, Germany. Photograph: Omer Messinger/EPA

Arms control

In February Trump pulled the US out of the Intermediate Range Nuclear Forces (INF) treaty with Russia that has kept missiles out of Europe since the cold war. There was general agreement in Nato that Moscow had cheated, but it was far from clear what advantage the US had gained by ripping up the treaty altogether. It tested some medium-range missiles but as yet there is nowhere to deploy them, in the absence of willing hosts in Europe or Asia.

The death of the INF leaves the world with a single surviving arms control agreement, New Start, which imposes caps on the US- and Russian-deployed strategic arsenals at 1,550 warheads each. It is due to expire in February 2021, but can be extended for up to five years by signatures from US and Russian leaders. Trump has declared himself a supporter of arms control but his administration has so far blocked an extension of New Start, another Obama legacy.

Officially, the administration wants a new treaty that includes China, but Beijing has refused to get drawn in. Its estimated arsenal is less than a 20th of the US or Russia’s, and its strategic warheads are not deployed on missiles. Insisting on Chinese inclusion is equivalent to condemning New Start to oblivion. A clue to that intention is the fact that the US has yet to put forward a concrete proposal, and staffing numbers have been cut in the office responsible for negotiating arms control.

The New Start treaty appears doomed by its provenance (the Obama administration) – and for that whimsical reason the last limits on world’s two biggest nuclear arsenals are due to disappear in a little over 13 months. An extensive regime of mutual inspections and exchanges of data will disappear with it, with the result that the US and Russia will lose a vital window into each other’s nuclear capabilities and intentions.

In the absence of coherent policy, there are certain themes that run through Trump’s actions on the world stage. The problem is they often conflict with one another. On the whole, Trump has sought to cut short the country’s long-running military entanglements, and to bring US troops home. His decision to call back the bombers aimed for Iran in June reflected that. But his withdrawal from the nuclear deal with Iran and his subsequent attempt to strangle Iran economically has significantly raised the potential for conflict in the Gulf. While reducing the US presence in Syria by a few hundred, the administration deployed 1,800 troops to Saudi Arabia, supposedly to deter Iran.

Dictators

Another Trump theme is the seemingly instinctive preference for foreign dictators over democratically elected allies. The former offer him at least an illusory promise of cutting a big deal to would cement a legacy, and he clearly believes that personal flattery of Vladimir Putin, Kim Jong-un and Xi Jinping is the path to such a deal. Allies he sees as freeloaders, living rent free under an expensive US security umbrella.

Hence Trump’s deeply sceptical view of Nato. He has refused to commit the US to come to the defence of its European allies in the event of a Russian attack, ignoring the obligation of collective defence that is at the core of the alliance’s founding treaty. If Trump wins re-election, the alliance’s future will be under a question mark.

The pendulum swings are likely to become more pronounced as Trump enters his fourth year in office and dedicates himself to a re-election campaign. Impeachment has clearly not restrained his instinct to mine foreign relations for electoral advantage. Rudy Giuliani is still flying to Ukraine to dig for dirt on Trump’s rivals. In the coming months, with the North Korean nuclear threat returning to centre stage, and Iran having less and less to lose in its standoff with the US, the stakes could be far higher.