Some thoughts on this issue.
We are in this mess because we've lost sight of our goal.
Why did we go into Afghanistan. 1) To get Osama Bin Laden. 2) To break up the Al Qaeda training camps.
Okay, we did those things.
The reasoning behind why we are still there is because we are trying to "build a democracy" so that the Taliban won't come back.
But the reality is, if there was a fair and open election, and the Taliban were allowed to run candidates, they'd probably win.
Obama decided to double down on Afghanistan because during the campaign, he called Iraq the "War of Choice" while Afghanistan was the "War of Necessity". It was his way of sounding like a hawk while still pandering to the Code Pink anti-war types.
But the idea that we could turn Afghanistan into a democracy should have gotten a rude wakeup call when Karzai stole the 2009 election. He probably could have won in the runoff, but he insisted on stuffing the ballot boxes. And then we forced him to reconsider, but by that point, everyone knew it was a farce. He was a puppet president stealing an election, so why bother going through the motions.
Meanwhile, Pakistan is playing a double game here. They are the ones who are created the Taliban to start with and are funding them now.
The Cold, Pragmatic thing to do would be to withdraw, but then put Pakistan on notice that we will hold them accountable for the Taliban's behavior when they take over again. We should also forge closer ties with India, a country that actually shares a lot of our values.