Presidents sometimes ask us to undertake missions that nobody else can do. We often do them well, but there is also more latitude for mistakes. Even successful efforts sometimes appear less so in retrospect. Ms. Haspel admitted as much with her comments that the C.I.A. was not prepared in 2001 to conduct a detention and interrogation program.

That said, it is just too convenient to lay all the blame for the post-Sept. 11 mistakes on Ms. Haspel and or on the C.I.A. As my former C.I.A. colleague Doug Wise wrote in The Cipher Brief, “One thing I know, it wasn’t Gina’s program, and it wasn’t the C.I.A.’s program, it was America’s program.”

The agency sought to use the full scope of its authority as provided by the White House and the attorney general, and as briefed to Congress. I’ve always wondered why we would refer to the C.I.A. overthrow of Iran or the C.I.A. torture program, while we never say the Department of Defense invasion of Iraq or the Air Force bombing of Serbia. Despite its secret charter, the agency executes presidential policies and adheres to congressional oversight. Its officers follow the law to the letter.

Those awful times put pressure on everyone to do more, and most especially on those at the front lines. In the charged atmosphere after the Sept. 11 attacks, we at the C.I.A. were stuck with a no-win situation. As Ms. Haspel noted in her testimony, C.I.A. officers believed they were doing their duty and were saving lives, and indeed they did so. But in retrospect, she said, it is clear that the C.I.A. went too far.

I agree with Ms. Haspel, and believe that the interrogation program was a mistake. However, having been among those whose job is to operate on the boundaries, I know that those boundaries shift depending on whether Americans feel safe or feel scared.

Ms. Haspel’s interest in strengthening the C.I.A.’s core business of intelligence collection and analysis was music to my ears. Emphasizing global presence, a focus on hard targets, improving training and language skills and investing in partnerships is the right way to go. The agency is good at building secret-trusting relationships, identifying potential sources, recruiting liaison partners and writing intelligence analyses. Improving the C.I.A.’s technical and cyber-skill set is also critical.