Two work colleagues of mine were ambassadors at our embassy in Kabul and I knew a number of lower level dips posted there through the years. The funds spent by my government through the embassy and the military was controversial within the department and the spin put on it to the public at home was shameful. History has shown that winning there is almost impossible and tribal issues hundreds of years old cannot easily be understood by outsiders, and frankly it is not outsiders business. If one of my loved ones died or was seriously wounded in this war, I would be furious as it was in vain.
In my time in Kabul - I served in a diplomatic capacity (Polad - that is, political adviser/counsellor) with one of the EU missions - my experience was that the US diplomats rarely, if ever, ventured out of the Embassy and - possibly for security reasons - didn't seem to have many Afghan contacts.
I do know that I met - and had been asked to brief - US diplomats that had never left the Embassy precincts, and had never met - or interviewed, or spoken with - an Afghan.
I wondered what they were reporting.
Actually, the "tribal issues" are, to my mind, more a "Pashtun" issue, for the Taliban is mainly (though not exclusively) a Pashtun body, and an expression of perfervid Pashtun nationalism, that seeks to conflate itself with Afghan nationalism (a view that is contested by Tajiks, Uzbeks, Hazaras, among others) and expresses itself by means of an unusually austere and severe interpretation of Islam.
It would be great if the west could save the world, ensure that the poor girls in Afghanistan could go to school and could live safely. But sadly, that was and is just a pipe dream. It is clear that the only way to have these things happen on a lasting basis is to either have foreign troops permanently stationed there or to provide never ending massive funding to try to support the country. We should do neither.
A third option would be to split the country, and hive off the Pashtun parts, whether unifying them with Pakistan, or creating some sort of new state, an independent "Pashtunistan" which would include the ungovernable and unstable "tribal territories" (FATA) of Pakistan.
Personally, I think that the north, centre, and west of Afghanistan (i.e. comprised of the Uzbeks, Tajiks, and Hazaras) could become a perfectly functional central Asian state; granted, not a model western democracy, but, for now, that is an ask too far.
However, until the state of Afghanistan works out a way to live with Pashtun exceptionalism - without destroying itself - (and perhaps, this may not be possible) and remember, even when the Taliban took over in the late 1990s, a region in the North of the country, the Panjshir valley, where the legendary Massoud held sway, remained beyond their reach and sway, for the other ethnicities will contest this Taliban surge, even if they have to enlist the support of the old war-lords to do so, - it will not be stable.