The killing of 24 Pakistan soldiers by American planes apparently stemmed from misunderstanding during a fire fight. US military officials insist an American/Afghan patrol near the Pakistan border was engaged in a fire fight with Taliban forces who retreated to the border. The exact line of a border is not as clear as one shown on maps. US and Afghan troops operate in the world of mountains and valleys which offer unclear perspectives on borders.
American officers insist they checked with the Pakistan army as to whether there were any of their troops in the area and were told none were in the immediate vicinity. US forces came across an encampment which had heavy weapons and proceeded to call in an air strike. Alas, it was a Pakistan check point.
The bottom line is failure on the part of Pakistan to control their own border which invariably results in mistakes. Yes, there should have been greater attention as to the nature of the encampment, but his is war and war is messy.