The endgame begins. London waits on Washington. Washington waits on Barack Obama. Obama waits on Kabul. Kabul waits on history. The clarion of military bravura in Afghanistan sounds an ever more uncertain note. It is obvious that this war is starting to stink, but no one dares say so. Everyone waits. Hillary Clinton even takes time off for diplomacy's favourite round of golf, telling Irishmen or Palestinians how to behave themselves.

Reports from Washington suggest a battle royal is being fought, as happens at a turning point in every war. It is between the loss-cutters and the one-last-pushers. The cast is familiar. The soldiers, led by the third general in a year to guide America's Afghan war, Stanley McChrystal, are doing what soldiers always do. They are asking for more troops, either 40,000 more (a 60% rise on the present American deployment) or preferably 80,000 more. This is coupled with our old friend, a "re-engineered" counter-insurgency strategy to win hearts and minds on the ground.

On the other hand much of Obama's cabinet and, it would seem, the president himself, cannot see the point in pouring good men and money after bad when all intelligence from the front points to strategic failure. Ever since Obama declared Afghanistan a "good war" he has been hoist on his own petard. Having adopted the war as vital to America's security, he can hardly admit that he was wrong while his generals are still urging him forward.

This is the moment in the approach of defeat when all stop thinking of war and start covering their backs. Generals may advise against a conflict but, once committed, their profession demands that they promise victory if only enough troops are committed. This means that when defeat occurs, they can blame politicians. In Britain this has been the tactic of both the present and previous army chiefs, Sir David Richards and Sir Richard Dannat. The latter has inexcusably taken himself off to the opposition Tory camp where he will doubtless persecute David Cameron with unhelpful advice.

Politicians are little better. Craving the electoral elixir of military victory, they will do anything to avoid admitting the inevitability of defeat.

For the last three years in Afghanistan, every British politician has mouthed the same nonsense. The war is "winnable but only if …" some unrealisable policy nostrum is adopted. There "must be a determination" to win hearts and minds, build roads and schools, eradicate poppies, retrain the Afghan army and bomb safe havens. Any rubbish will do when prefixed with if and suffixed with victory. As for the poor bloody infantry, they are "dying for freedom" while politicians play for time.

Some glimmers of sanity are showing in Washington, if not in London. Suddenly it is "time to negotiate with the Taliban", as if this were unthinkable before. There is talk of an "Iraqi-style surge", of somehow separating Taliban from al-Qaida, of good Taliban and bad Taliban, of decapitating the Taliban's extremist leadership with drone bombers.

There is even talk of the Taliban not being the real enemy of the west after all, as indeed they keep asserting. Perhaps they are just colourful Pashtuns who mean no harm to anyone but each other. Their former hospitality to al-Qaeda was a phenomenon of the 1990s that in future can best be prevented by means other than a regional war.

Enter those picadors, the historians, to taunt statesmen with darts of wisdom in their hour of torment. In America, debate over the future of the war has, according to recent reports, degenerated into an intriguing "battle of the books", on the dread precedent of Vietnam. Was that defeat the result of politicians refusing the army resources for one last surge, as claimed in Lewis Sorley's A Better War, or was it due to their losing control to the military over a doomed escalation, as claimed in Gordon Goldstein's Lessons in Disaster?

Needless to say, the Pentagon hawks are reading – and preaching – the former. They want an Iraq-style surge in Afghanistan to take, hold and pacify Taliban territory and eventually drive the insurgents back over the border into Pakistan. This would mirror what they believe would have happened in Vietnam after the 1968 Tet offensive, had American public opinion not lost the will to continue the war.

The doves are reading Gordon Goldstein and demanding an urgent withdrawal to Kabul. Hamid Karzai's regime should be left to its fate by letting it negotiate with provincial warlords and the Taliban's local commanders, as it often claims to want to do. The eventual outcome, as in Vietnam, would be a regime more tolerable to the west and more hostile to al-Qaida than anyone imagined at the time.

As a sop to the hawks, the doves offer military force to be concentrated on al-Qaida leaders, with drone attacks wherever intelligence can find them. Rather than Vietnam, they regard a better precedent as being Reagan's abrupt retreat from Beirut in 1984, under cover of bombing the Syrians in the Lebanon's Chouf mountains. Who now remembers that defeat?

The scene is thus set for nemesis in both Washington and London. Because of a gross over-reaction to 9/11, leaders have turned a terrorist outrage from what should have been a global coalition against Islamic extremism into a costly and bloodthirsty display of military chauvinism. America, Britain and the other Nato powers are hopelessly trapped. All intelligence concludes that policy has failed. Yet such is the awesome logic of war that nobody can bring themselves to listen.

The sooner the Afghan war ends, the better. It has no real bearing on western security and is merely cover for politicians to avoid confronting their past mistakes. But extrication will require a bold act of leadership by Obama.

Perhaps the looking-glass world of the Nobel peace prize could at last vindicate itself. If prizes are to be awarded before rather than after they are deserved, perhaps Obama will feel obliged and emboldened. Perhaps he will refuse to continue the slaughter in Afghanistan and accept that it is time to go home and earn his award.