The Taliban are not terrorists and has never attacked the Americans prior to the invasion of Afghanistan. As a matter of fact the Taliban government even went to Texas and met with then Governor Bush (before he was President) to discuss some business as one might guess it's about oil pipeline and that was back in 1997. Although the precious articles and pictures have been scrubbed off Google since I couldn't find the material anymore. And am sure you remember how the Taliban came to being anyway since most of them were trained Mujahideen fighters by the U.S. when it's previous geopolitical foe was the Soviet Reds.Oh, they did.
While US discount sold "We don't negotiate with terrorists" to its masses home, it conducted backchannel negotiations with these terrorist outfits for other low profile cases that does not trigger or affect the populace at home.
Cases where a threat of or direct terrorist attacks, hostage etc happen are barred from negotiations. Other cases - material, territory, local populace etc do include negotiations.
Such backchannel negotiations were there regarding release of local populace who helped NATO, US etc.
And what is your suggestion that America ought to stay in perpetuity in Afghanistan to keep doing the same s..t over and over again with no tangible results to show? That's lunacy and outright folly. Again, as mentioned the U.S. has a habit of neglecting proper training to their so called Allied troops to the point of total incompetence. They have a record of failures from China, Korea, Iran (Shah),Vietnam, Iraq, Georgia, Saudi, Afghanistan, Ukraine. I have yet to actually see any tangible results from an American led training and equipping where the trained force have distinguished itself and made American military training look good.
At the end of the day this episode in Vietnam War, a battle between the ARVN vs the Vietcong, Vietminh troops is the going to play out in our smartphone and computer screen sometime this year. American failure.