How a crippling intelligence loss led the CIA on a mole hunt