WASHINGTON — Face to face with a former C.I.A. officer in 2013, federal agents took a calculated risk. They did not confront him about the classified information they had found in his luggage. And they did not ask what they most wanted to know: whether he was a spy for China.

It was a life-or-death call. The Chinese government had been systematically picking off American spies in China, dismantling a network that had taken the C.I.A. years to build. A mole hunt was underway, and the former officer, Jerry Chun Shing Lee, was the prime suspect.

The F.B.I. could have arrested him on the spot for possessing classified information. But inside a secretive government task force, investigators argued against it, former American officials recalled. If Mr. Lee was a turncoat, arresting him on an unrelated charge would tip off the Chinese and allow them to cover their tracks. If he was not the mole — and some argued strenuously that he was not — an arrest might allow the real traitor to escape.

So the F.B.I. allowed Mr. Lee to return to Hong Kong, court papers show, where he hastily resettled with his family. The agents, working out of an office in Northern Virginia, gambled that by watching patiently, they might piece together how China had decimated the United States’ spy network, and determine whether Mr. Lee had helped.