An investigation into the complete and systematic destruction of the US CIA's network of human assets in China which began in 2010 is pointing at the agency's communications system and hygeine as a substantial factor that aided the Chinese spy hunt (archived). The agency was afflicted by arrogance and lifted the system they had been using successfully in Middle East operations without giving much thought to the reality that China is an emerging power that managed to capture the bulk of the world's manufacturing within a generation, and perhaps China was more technologically sophisticated than the pashtuns embarassing them in the middle east.
The rapidly compromised spy communications network, arrogance concerning the security of the network, with the possible extra insult of one alleged defector broke the agency.