The arrest of former CIA case officer Jerry Chun Shing Lee sheds light on a shadowy counterintelligence drama that has been playing out for nearly eight years. Starting around 2010, the Central Intelligence Agency saw some of its most valuable spies inside China go down. And I don’t mean “going down” in a perp-walk-to-the-courthouse sort of way. This is China: They were executed. One was reportedly shot right outside the government building where he worked, just to make sure his coworkers got the message. The lucky ones were imprisoned. According to The New York Times, 18 to 20 CIA sources were blown, making it one of the most damaging counterintelligence losses in agency history.

The story of Lee’s arrest is still developing, but much is already clear. First of all, Jerry Chun Shing Lee wasn’t some back-room paper-pushing bureaucrat at Langley. He was a “case officer” whose job was helping to recruit foreign spies to spill secrets to the United States. He was supposed to create moles, not become one.

It also appears the Chinese government probably gained access to highly classified information about U.S. assets through electronic means, a mole, or both. According to press reports, intelligence officials have been sharply divided about how exactly all of this valuable intelligence got into Beijing’s hands. News of Lee’s arrest suggests that a mole was involved but certainly does not rule out other possibilities or people.

The FBI has not yet run this case to ground. According to the affidavit by FBI Special Agent Kellie R. O’Brien released Tuesday, FBI agents searched through Lee’s belongings while he stayed at hotels in Hawaii and Virginia back in August 2012. Those searches found two little books filled with big secrets that included the true names of Chinese assets, operational notes from clandestine meetings, as well as covert CIA facility locations. Now, more than five years later, Lee has been arrested only for unlawful retention of national defense information, not for handing that information over to a foreign government. If there’s another shoe, it hasn’t dropped yet.

It’s also clear that the damage done is big. In addition to blown assets, which take years to develop, and compromised information, which likely revealed American intelligence tradecraft, the organizational aftershocks for the CIA will be significant. Counterintelligence failures are the ultimate betrayal, when one of the agency’s own—someone inside the circle of trust who swore an oath and promised to serve—turns against country and cause. Lee’s coworkers and others are undoubtedly asking themselves what they could or should have known. Investigations are undoubtedly exploring what early warning indicators might have been missed and what more could have been done. The heat will be on to learn the right lessons for the future and to tighten security protocols. All of these steps are important and necessary. But it’s a delicate thing, dealing with betrayal. Counterintelligence taken too far can create a debilitating, distrustful culture where suspicions run wild, careers can be destroyed, and truth can get lost.  

How do we know? Because we have seen this before. For 20 long years, CIA counterintelligence efforts were led by a boozy paranoid named James Angleton who was seared by the discovery that one of his dearest friends in British intelligence, Kim Philby, was actually a Soviet mole. Philby was eventually sacked and fled to Moscow. Angleton was convinced the Russians had more Philbys in the United States, and he spent his life on a relentless quest to find them—trusting no one, suspecting everyone, and ruining the lives of many. At the end of his career he was widely viewed as cagey, uncontrollable, isolated, and drunk. Decades later, the CIA’s own historian charitably described Angleton as someone whose “negatives outweighed his positives.”

The final pages of Lee’s spy story haven’t been written yet. But history suggests some useful lessons about how they should not end.