For the past 11 years of war in Afghanistan, there has been one simple question put to the US military: who is winning, the US-led coalition or the Taliban insurgency?
The answer from the military has been upbeat, but evasive. Generals talk of "reversing the momentum" of the Taliban and "pushing them out of population centres".
Given the nature of counterinsurgent warfare, there is unlikely to be a victor anytime soon. And yet it is clear that the war is entering its endgame. Soon all of the 33,000 troops that US President Barack Obama sent to Afghanistan in 2009, in a "surge" intended to beat the Taliban, will have gone home.
If Mr Obama is re-elected in November, the other 66,000 soldiers will be out by the end of 2014, leaving only trainers and advisers.
Given that timetable, and with the insurgency bloodied but not defeated, the focus must inevitably move to what happens after 2014.
At this stage it looks as if the key issue for the White House is keeping Afghanistan out of the news during the US election campaign. The question put by General David Petraeus, former commander in Afghanistan - "Tell me how this ends" - hangs in the air.
This week has seen a sea change in Americans' perception of the war. General John Allen, commander of the US-led International Security Assistance Force (Isaf), set out restrictions on joint patrols with Afghan forces, following a spate of killings of foreign troops by their Afghan allies. The number of these "green on blue" deaths (blue is the traditional colour of the Nato alliance) has risen sharply, to 51 so far this year, and is of course sapping troop morale.
And yet the training and mentoring of the Afghan army, which is being built up at a breakneck speed to 350,000 ahead of the US withdrawal, is the key element of western strategy. There are only two years to transfer the full burden of defending the country to what is so far an ill-equipped and sometimes poorly motivated force.
The US military apparently hoped to slip out news of the suspension of joint patrols without prompting a deluge of negative comment. When the British defence secretary, Philip Hammond, was briefed on the change, its significance passed him by, to such an extent that when he heard the story on the BBC he did not realise he had already been informed of it.
Ministerial incompetence or military sleight-of-hand, this has enraged public opinion in Britain, which had grown sceptical of the military's endless optimism. Soon some members of Parliament were demanding that Britain's 9,500 troops come home by Christmas, since there was no point in them staying to mentor an Afghan army that apparently did not want to be mentored.
Instant withdrawal is unlikely. But as the chairman of the US joint chiefs of staff, General Martin Dempsey, has said, this problem cannot be "whitewashed".
Official estimates say that between a quarter and half of the insider killers are Taliban infiltrators. Some analysts interpret this as a sign of the Taliban driving a wedge between the Afghan army and the foreign forces. But why, some experts ask, did they wait so long to try out this tactic?
The wedge theory is no doubt true in part, but since most of the attacks are not carried out by Taliban infiltrators, there must be another cause. A Nato study - disavowed by the alliance - concluded last year that the cause was cultural incompatibility.
There certainly is some of that. Many US soldiers find their Afghan counterparts lazy and given to drug taking. For the Afghans, having English-speaking soldiers cursing and swearing at them (as they do to each other) feels like an insult that demands retribution.
Leon Panetta, the US defence secretary, says these insider attacks are the "last gasp" of the Taliban. This is a rash assessment, given that the insurgency has a secure base in neighbouring Pakistan.
The Taliban have undoubtedly been driven out of some strongholds in Kandahar and Helmand provinces in the south. Drone attacks have wiped out some of their leading commanders. But attacks have increased in the east of the country, and we are seeing a spectacular new type of assault, such as the one Monday on the base at Camp Bastion where six Harrier jets were destroyed, and two US Marines killed. The insurgency has moved from holding territory to fighting a more political struggle, to demoralise the foreign forces.
Before the Russians retreated from Afghanistan, ending a nine-year campaign, they spent years preparing the ground politically. They invited in the United Nations to open communication with the rebel forces and neighbouring states, in search of political reconciliation. They groomed a leader, President Mohammad Najibullah, who had a successful record of manipulating the country's tribal structure. They nurtured an effective army. And they negotiated safe passage out for their troops.
Najibullah defied CIA predictions that he would not last more than a few months, and his army defeated the mujahideen forces backed by the US and Pakistan. He fell only when the collapse of the USSR cut off his supplies of money and arms.
The US has not ticked off this to-do list. President Hamid Karzai is a mercurial figure. Inviting in the UN would be an unthinkable admission of defeat in a US election year. The idea of a regional peace plan involving Pakistan, Iran, Russia and India, is unfeasible. Long-promised talks with the Taliban have got nowhere, with the US military more keen on drone attacks than negotiation. The Afghan army, for all the $4 billion promised by Nato, looks unlikely to be ready in time.
That does not mean that the Taliban will be in Kabul in 2015. Rather, a messy civil war looks set to continue. But it would be a pity if the guiding principle of the next two years were to save the honour of the US military, rather than to try for a power-sharing agreement.
On Twitter: @aphilps