When you want something too much, the first thing you are prepared to give up are your principles, even though you may have held these principles for a long time. The USA badly want the troops out of Afghanistan.
But when the other party finds out how desperate you are, they will punish you and charge you for it. So there are bombings even when you are talking peace. The other side knows that they have you in a tight place.
What India is attempting in such times is perhaps the best way ahead. India is trying to hold, consolidate and strengthen what she has rather than let things drift out of any semblance of order. It is high time too, especially with the US deciding to leave the neighborhood in a worse state than it was when they walked in first.