Stephen Walt draws some deeper lessons:
Our strategy in Afghanistan based on "nation-building." We hope to create Afghan institutions that can run the place so we can leave. That goal, in turn, is predicated on the belief that the United States and its allies have sufficient knowledge and skill to create something that has never existed before: an effective, efficient, legitimate, Western-style state in Afghanistan. Accomplishing this task requires that we understand the underlying culture, the history, and the cross-cutting cleavages within Afghan society, and that we have sufficiently intimate knowledge of the players to know whom to work with and whom to shun.
There was already plenty of evidence that this knowledge was lacking. After all, back in 2002 we thought Hamid Karzai was the ideal choice to lead a new Afghan government. Now, nearly eight years later, he's proven to be a disappointment (at best). And this latest fiasco merely underscores the degree to which we are out of our depth there. There's no question we can kill a lot of Taliban (or people we suspect might be Taliban, or unfortunate civilians who get in the way), but successful nation-building requires a lot more than that.
So here's Rule No. 1 for would-be Afghan nation-builders: If you can't tell the Taliban from the imposters without a scorecard, maybe you shouldn't be playing this game.