Americans are justly eager to end their longest war ever and bring home their troops from Afghanistan. President Obama’s administration promises often that the war will be over in 2014, forgetting that the war almost certainly will not end for Afghans next year even if all American and other foreign forces depart the country. This eagerness to find a way out has been on display in Doha in the preparations to begin a political process to get the Taliban to the negotiating table. The truth is we really don’t even know who is calling the shots in the Taliban leadership today.

After years of indirect talks between the Taliban, Washington, Kabul and several other third parties, the Qatari government allowed the Taliban to open an office in Doha with the Taliban flag flying and signs everywhere proclaiming the office represents the Islamic Emirate of Afghanistan. For President Hamid Karzai and the Afghan government America supports, the symbolism was a sell-out. Instead of treating the Taliban as a political party or a gang of terrorists, the Taliban got the symbols of full statehood. The Islamic Emirate of Afghanistan is the title the Taliban gave the government they and Pakistan created in the 1990s. It was only recognized by two other governments then and was ousted by a United Nations-endorsed and America-led international coalition in 2001 after it harboured the al-Qaeda attack on 9/11. For Karzai and his government, the announcement, the flags and signs conceded the legitimacy of the Taliban’s claim to be the authentic government of Afghanistan and that the NATO-led army is nothing more than a foreign occupation illegally backing up a rogue regime. The most hardline elements in the Taliban were strengthened by the Doha office opening.

The Taliban’s patrons, the Pakistani army and its ISI intelligence service, were pleased with the outcome. Pakistani journalists close to army chief General Ashfaq Kayani quickly announced that he orchestrated the entire Doha affair and outsmarted the Americans. The Pakistani generals believe time is on their side in Afghanistan, that America has already lost the war and that their clients will prevail.

Mullah Omar, who most believe lives under ISI protection in Quetta, Pakistan, said nothing. That is not unusual. He has not been seen in public in years. On rare occasions, a message is issued in his name but he never appears in front of his followers. For all the world knows, the self-styled Commander of the Faithful may be dead, mad or incapacitated. The Taliban team in Doha is said to be totally loyal to Omar but they too are creatures of the ISI. As the former head of Afghan intelligence, Amrullah Saleh, likes to point out, the Taliban negotiators in Doha fly home to Karachi whenever they want to see their bosses or their families. They are not independent players.

Karzai was in Doha just a week before the office opening and he clearly warned the Qataris and Americans not to give the Taliban these symbolic victories. So he suspended the talks with the United States on a long-term strategic agreement to provide for a post-2014 security relationship between America and Afghanistan and he announced his government will not participate in any political process with the Taliban under the Doha ground rules. After several messages from Secretary of State John Kerry, Karzai has backed off and the offending flag and sign have been removed in Doha, at least temporarily.

But the Doha debacle will be seen by many as a portent of the future. Karzai undoubtedly noted that the US also backed down on its longstanding demand that the Taliban break publicly with al-Qaeda. Instead, the Taliban made vague statements about never letting “their country” be used for terrorism against another. That echoes the Taliban’s statements before and after 9/11 that al-Qaeda was not engaged in attacks on American targets despite all the obvious evidence that it was. The Taliban leadership has never broken with al-Qaeda and openly mourned the death of Osama bin Laden two years ago after Obama sent commandos to kill him outside the gate of Pakistan’s Kakul military academy in Abbottabad. For its part, al-Qaeda still swears loyalty to Taliban leader Mullah Omar as the global commander of the jihadi faithful. Perhaps they know if he is really still running the show in Quetta, perhaps not. But al-Qaeda fighters are still on the battlefield in Afghanistan fighting with the Taliban.

For his part, Karzai seriously overestimates American interest in a long-term partnership with Afghanistan. He believes the US wants long-term access to Afghan military bases to continue drone operations against al-Qaeda targets in Pakistan and to conduct intelligence surveillance over Pakistan, Iran and other parts of Central Asia. He misjudges just how badly many Americans, especially members of Obama’s Democratic Party, simply want to get out of the war and abandon the Afghans to their fate. Thus he plays his weak hand with a bluntness that often backfires.

In principle, negotiations with the Taliban is a good idea. A political process that helps to reconcile Afghans together is badly needed. But the Afghans should run the show. The ISI cannot be trusted to deal in good faith. Outsourcing American diplomacy to Qatar, itself a Wahhabi state, was a dangerous approach. American diplomats should also press a lot harder to find out who is in charge on the other side of the table, and who really is calling the shots on the battlefield and the conference room.