The CIA and other spy agencies are scrambling to close intelligence gaps as they seek ways to support possible military or covert action against the leaders of the al-Qaeda-inspired militant group that has seized parts of Iraq and threatens Baghdad's government.