Documents published by wikileaks show that American officials think Pakistani intelligence cooperates with the Taliban to oppose the US and the Karzai government in Afghanistan.
I suspect that many of the particular claims in these documents are not true, because Pakistani intelligence works very hard to create a cloud of uncertainty around its actions in Afghanistan and the tribal areas of Pakistan. They seem to be playing double, triple, even quadruple games. But it seems clear from this ongoing mess that the last thing they want is a stable, centralized, American-allied nation on their northwestern border. Their ambivalence is another reason I think we will never achieve our aims in Afghanistan.