What is the biggest challenge facing the next president of the United States? How to deal with China. The relationship between the emerging and the enduring superpower is the greatest geopolitical question of our time.

If Washington and Beijing do not get it right, there will probably be war somewhere in Asia some time over the next decade. Vladimir Putin’s neo-imperialist Russia and the brutality of Islamic State are medium-sized regional challenges by comparison. Climate change and the world economy cannot be managed without American-Chinese cooperation. All this demands a bipartisan American grand strategy for the next 20 years, but US politics seems incapable of generating anything more than a partisan soundbite for the next 20 minutes.

In the South China Sea, China has, by massive dredging operations, turned submerged reefs with names out of the novels of Joseph Conrad – Mischief Reef, Fiery Cross Reef – into artificial islands, and is completing a 3,000m runway on Fiery Cross. President Xi Jinping recently presided over a massive, Kremlin-style parade of China’s military force, with Putin standing beside him as an honoured guest.

In support of its claim to a vast area of the South China Sea, within its “nine-dash-line”, China has rammed Philippine fishing boats and buzzed a US spy plane. The US has responded by telling its Asian allies that it will run “freedom of navigation” patrols past the disputed islands.

Interestingly, when Chinese warships sailed through US territorial waters around the Aleutian islands last month, the US military reacted coolly, saying the Chinese naval vessels passed “in a manner consistent with international law”. The technical term for this is “innocent passage”. So now watch out for the Chinese reaction when US warships make innocent passage past Fiery Cross or Mischief Reef. Battleships sailing defiantly past disputed islands: what century are we in?

All this is bubbling up while Xi is firmly in control at home, with no immediate domestic crisis. But the Chinese Communist party does face a long-term legitimation crisis. For decades, it has derived political legitimacy from impressive economic growth, which is now slowing down. I believe Xi is making a massive Leninist gamble that reasserted single-party rule can manage the development of a complex, maturing economy and satisfy the growing expectations of an increasingly educated, urban and informed society. The Chinese leadership’s crude attempt to command the Chinese stock markets to rally earlier this year, reminiscent of King Canute’s confrontation with the incoming tide, is not encouraging.

They can almost certainly keep the lid on for several years but, as always happens when necessary reform is postponed, the eventual crisis will be larger. At that point, the temptation for the Communist party leadership to play the nationalist card, perhaps with an actual military move, Galtieri-style, against one of China’s Malvinas/Falkland Islands, would be very strong. Probably this would not be a direct confrontation with a formal US ally, but the risks of miscalculation and escalation would be high. With angry, nationalist public opinion in both countries, neither the Chinese nor the American leader could be seen to lose, and both sides have nuclear weapons.

This is not idle scaremongering; it’s something the US military, intelligence and thinktank communities think about all the time, in order to avoid it.

Precisely because China’s future course will mainly depend on forces within the country, beyond Washington’s control, the United States needs a wise, consistent, strategic deployment of all the instruments at its disposal. This should be something like the “twin track” strategy adopted by the west during the last two decades of the cold war (although obviously not expecting it to end the same way).

On the one hand, there should be no room for doubt in Chinese minds about what the US will accept militarily. US policy should be the opposite of what Barack Obama did over Syria (declare a “red line” and then allow Bashar al-Assad to walk across it with impunity). In China’s case, the US should declare no public red lines but in private communication, and through deeds that speak louder than words, make it clear that they exist.

At the same time Washington should redouble its attempts at constructive engagement. There should be intensive efforts to find shared ground on climate change, the world economy and geopolitical issues from North Korea to Syria.

The intensive business ties that already exist should buttress the relationship. There is already an extraordinary people-to-people relationship, embracing many millions of better-off Chinese who have studied, worked and lived in the west. This strategy should be coordinated with key US allies who have their own major relationships with China, such as Australia, Germany and Britain, which will welcome Xi on a state visit next week.

The China expert Orville Schell suggests that the next US president should appoint a high-level special envoy to China. President Hillary Clinton, he argues – tongue only half in cheek – would have the perfect candidate in Bill Clinton, who has the prestige of a former president, the experience, and negotiating skills. President Marco Rubio could offer the job to Jeb Bush, whose father was US envoy to Beijing in 1974–75 and whose brother, George W, presided over a good relationship with China.

Republican presidential candidates make random, sometimes wild comments about China

As it looks at the moment, all this is pie in the sky. Republican presidential candidates make only the most random, sometimes wild, comments about China. Dr Ben Carson tweets a photograph of a US aircraft carrier with the words “This is How to Compete with China”. With a mixture of invincible ignorance and bluster, Donald Trump suggests the trouble is that China’s leaders don’t respect Obama. But if Xi just sat down for a couple of beers with dealmaker Trump, all would be well.

And Hillary Clinton, the one candidate with serious policy experience of China? This week, she shamelessly reversed her position on the Trans-Pacific Partnership, the major trade deal with Asia which she has emphatically supported for many years and when secretary of state described as “the gold standard in trade agreements”. Her volte face is made for transparently opportunistic reasons, to pick up the Democrat labour union and protectionist votes that are currently going to Bernie Sanders, who vows to defeat the “bad trade deal”.

Here is the tragedy of a policy on which so much depends for us all. The United States has a sophisticated policy community capable of generating the bipartisan and multilateral grand strategy towards China that we need. Unfortunately it has developed a way of doing politics which makes it impossible to sustain such a strategy. To adapt a famous observation by putative special China envoy Bill Clinton: it’s the politics that are stupid.