Let's get a few things clear. There will be no war between the US & Pakistan. Neither country wants that. The Americans are suffering terribly in Afghanistan, & Pakistan is faring badly as well. However, with polar opposite objectives of both countries w.r.t Afghanistan, some compromises will be made by both countries before the US withdraws its troops.
The ISI needs to reform itself. It has created a cobweb for itself. It is rooting for the Haqqani network & the Quetta Shoora for the end game in Afghanistan. The US does not want the Haqqani network in the picture for the end game in Afghanistan. I believe the US is fine with some kind of power sharing between the Mullah Umar group (Quetta Shoora) & the present leadership in Afghanistan, but no group that has strong ties with the Al-Qaeda.
Let us make a distinction between a few groups:
1. Al-Qaeda (Arab fighters, international group of terrorists)
2. Al-Qaeda affiliate groups in the region (LeT, HeM, IMU, TSNM)
3. Afghan Taliban (Mullah Umar group, Hekmatyar, Haqqani)
4. Pakistani Taliban TTP (Mehsud group, Fazlullah, Waziri group. The Waziri group have burned their bridges with Mehsud & Fazlullah)
5. Punjabi Taliban splinter groups (LeJ)
It is very easy to see in these 5 categories how the cobweb has been created. The Al-Qaeda needs splinter groups, & local Pashtun groups to thrive in the Afghanistan-Pakistan border region. So the Al-Qaeda are protected by all these groups. While the Al-Qaeda are given protection from the Afghan Taliban, the TTP, the Punjabi Taliban; these 3 groups do not have the best of relations with one another, with their loyalties shifting very easily. While Pakistan is rooting for the Haqqani network as well as the Waziri group (Mullah Nazir, Hafiz Gul Bahadur); these groups have strong ties with Al-Qaeda as well, & the Al-Qaeda is an inherent threat to Pakistan, even if the Haqqani network & Waziri group by themselves aren't. Pakistan needs to disentangle itself from this cobweb.
The local Punjabi Taliban are splinter groups, & they aid the Al-Qaeda & their affiliate groups such as the LeT, HeM in Kashmir; & the IMU, TSNM in Afghanistan. The ISI has not supported these groups in anyway, but they have not disbanded the Punjabi Taliban either as they 'serve a purpose in the region'. But the LeJ is also responsible for the killing of Shias & other minorities in Pakistan. The Al-Qaeda & their affiliate groups are a threat to Pakistan as well, & are responsible for killings inside Pakistan.
In North Waziristan, the ISI is looking to root out the Mehsud TTP faction by marginalizing them, getting the support of the Haqqani network & the Waziri group to fight them. That will most likely work out in Pakistan's favor as well. While the ISI will not be looking to burn bridges with the Haqqani network, they need to make sure that the Haqqani network sever their ties with Al-Qaeda groups & their affiliates. The Punjabi Taliban that aid the Al-Qaeda & their affiliates in Kashmir & Afghanistan, & are responsible for suicide bombings inside Pakistan must be rooted out.