Leon Panetta, the US defence secretary, was in Kabul this week, inviting Afghan President Hamid Karzai to the White House. On Thursday, he popped over to Kandahar, met some US and allied soldiers, and spoke cheerfully to reporters about how much the Taliban and Al Qaeda have been weakened.
A few hours later a suicide bomber, as if mocking Mr Panetta, killed one US soldier and three Afghan civilians, while wounding at least 20 other people, in an attack right outside the fortified Kandahar base.
Plainly, US optimism - and the time-honoured strategy known as "declare victory and get out" - are far distant from the realities of Afghanistan. The military gains of 2011 and this year, so touted by Mr Panetta, are plainly transitory where they are not illusory.
As always, the real solution will be political, and yet the US has made little progress down that avenue. After 11 years, $642 billion (Dh24 trillion) spent by the US alone, and untold numbers of Afghans and others killed - and with the "drawdown" of US forces set for 2014 - a political solution seems as far away as ever.
But is it? There is no certainty that the weak Karzai government will be a major player in the post-2014 Afghanistan; Mr Karzai is derisively called the "mayor of Kabul", his policemen keep defecting and just this week US inspectors said devices at Kabul airport, intended to monitor the amount of cash high-ranking Afghans take out of the country, are routinely eluded, ignored or not even connected.
A post-withdrawal Afghanistan unified under a federal government in Kabul is a distant dream. The country will be ruled - as it always has been - by a patchwork of ethnic, regional, tribal and other leaders.
A peaceful transition will, by definition, include erstwhile enemies in that political solution. From the outside, this may seem self-defeating as elements of the Taliban are brought into a government that has been fighting them. Some of these Taliban were, after all, responsible for the medieval barbarity that characterised Kabul of the mid-1990s.
But the Taliban are not monolithic. The Pakistan-sponsored deal in recent weeks has encouraged western powers to take certain Taliban members off terrorist black lists, which would allow them to participate in the new political order. This is only common sense - many politicians already in Kabul are self-professed former Taliban.
The challenge, more acute as US withdrawal approaches, is to find ways to assemble a political coalition, however loose, that will give Afghans some measure of control over their own valleys and villages and towns. The United States has done little to broker that solution - now it must not stand in the way.