So it's important to look carefully for clues about how it happened, and lessons for the future.
CIA veterans cite a series of warning signs that the agency wasn't paying enough attention to the counter-intelligence threat posed by al-Qa'ida. These danger signals weren't addressed because the agency underestimated its adversary and overestimated its own skills and those of its allies.
The time to fix these problems is now, not with a spasm of second-guessing that will further weaken the CIA but through the agency's adaptation to this war zone. As the Khost attack made painfully clear, the CIA needs better tradecraft for this conflict.
By getting a suicide bomber inside a CIA base, the al-Qa'ida network showed that it remains a sophisticated adversary despite intense pressure from CIA Predator attacks.
This shouldn't have been a surprise: CIA sources say that during the past year, two al-Qa'ida allies in Afghanistan - the Haqqani and Hekmatyar networks - have run double-agent operations. That tactic succeeded disastrously in Khost on December 30, when the CIA's defences were penetrated by a Jordanian doctor posing as an informant for the Jordanian intelligence service.
Why wasn't the Jordanian debriefed outside the base, or thoroughly searched when he arrived, given the danger he might have been turned by al-Qa'ida? Did the CIA trust its Jordanian ally too much? Those basic questions need answers.
The Haqqani and Hekmatyar double agents were uncovered last year through polygraphs and other means, but agency insiders argue that these cases should have prompted tougher countermeasures. Both the Haqqani and Hekmatyar groups have their own intelligence units, and their operatives were expertly trained in the 1980s by Pakistan's Inter-Services Intelligence directorate.
Muslim extremists are using increasingly sophisticated tools, sometimes the very techniques deployed against them. One example is the software used by Hezbollah to analyse patterns of mobile phone calls and expose an Israeli spy network in Lebanon last year. Iran uses sophisticated pattern analysis to study which of its nuclear scientists might have been recruited by the West.
Despite this growing threat, the CIA has devoted only limited resources to defending itself. Within its large Kabul station, the CIA is said to have just two officers working full time on counter-intelligence. There's a similar lack of resources devoted to Pakistani operations against the agency.
The 2004 intelligence reorganisation added more layering and bureaucracy but not more muscle. It created a new National Counterintelligence Executive, but this group has focused on traditional targets such as Russia and China rather than new ones.
"What good is it?" asks one CIA counter-terrorism veteran. "It's overhead. It contributes little, other than additional tasking and more meetings."
The CIA's career track is another troubling part of the problem. The complex penetration and deception operations that could counter al-Qa'ida take time and patience. But agency operations mirror the short, two-year tours of assignment, or the even shorter deployments to war zones. "We live in two-year cycles," says one insider. The rational careerist looks at a penetration or deception plan and concludes: "It's too time-consuming, it won't get me promoted."
What's most troubling is that during the past year the CIA has had what this source calls "egregious lapses of counter-intelligence and security at the bases in Afghanistan".
Evidence of sloppy procedures is said to have surfaced last late last year at one of the agency's bases in southern Afghanistan. One of its vehicles was stolen but headquarters wasn't notified for several weeks. Someone was caught photographing the entry gate to the base, but he was initially turned over to the Afghan police rather than to agency operatives. An Afghan guard failed a polygraph, raising worries that he might be a double agent. Yet aggressive countermeasures weren't taken.
A final obvious problem is training. Case officers need more preparation for high-threat meetings and paramilitary challenges than they're getting.
After any calamity, there are always haunting what-ifs. But looking in the rear-view mirror isn't going to make the CIA any stronger or better.
The Khost attack shows that al-Qa'ida's network, though badly wounded, remains a wily and resourceful foe. The inescapable conclusion is that the CIA and its allies need to lift their game.
David Ignatius is a columnist with The Washington Post.