Mishap.” “Sloppy.” “Blunders.” “A Pizza Hut in Beirut.” Not necessarily words one expects to see all together in an international affairs news story about American spies. But this is the CIA we’re talking about. Literally anything is possible, including a humiliating outing of foreign agents employed by the CIA to spy on Hezbollah and Iranian assets. Anonymous sources told the LA Times that the CIA station in Beirut is basically “out of business” as a result of this affair.

At least a dozen sources — who may now be “facing execution” — were reportedly compromised through shocking operational deficiencies that made the spies easy pickings for Hezbollah’s counterespionage agents.

Hezbollah reportedly scored this coup by sending double agents to the aforementioned Pizza Hut used by the CIA handlers and agents, and by using phone tracking software that the U.S. knew back in 2009 was capable of compromising CIA agents’ identities. That’s the bigger issue: while Hezbollah, which is extremely vulnerable to electronic espionage, has upped its signals interception game, the U.S. knew about this risk but didn’t change its operating procedures. As Forbes simply put it, “The lessons the CIA learned [from Israel] did not prevent their own spies from getting caught.”

Iran allegedly managed to discover what websites CIA informants were using to relay intelligence to their handlers and tracked people down through the internet. This par for the course: for every Stuxnet “success” U.S. cyber spooks score, there is a failure called Haystack to match it.

“Good luck finding that needle,” read the tag line for Haystack program, trumpeted by the State Department as a tool for Iranian dissidents to use as a mask for their activities online. Well, Tehran found “that needle” several times over: Haystack failed to protect Iranian dissidents’ identities and has been quietly, embarrassingly shelved. The Iranian regime found even more valuable needles this time: people willing to risk their lives to spy for the CIA. That is a much rarer commodity, and, one imagines, one likely to be a scarcer one from here on out at a time when good intelligence is needed most (the perfect storm of an election year and IAEA report).

How could an intelligence agency once capable of pulling off Cold War coups reach this point? In the 1980s, Langley reportedly ran rings around the USSR’s industrial espionage program thanks to clever use of a well-connected KGB agent. In 1991 it secretly shipped captured Iraqi tanks to Afghan fighters via Pakistan. And now, CIA agents are getting their covers blown over pan pizzas?

The Atlantic’s Max Fisher asks an important question here: “is this the cost of counterterrorism?”

Apparently so. The CIA has indeed become targeted towards counterterrorism. “Kill, capture or detain” have become the orders of the day, rather than “photograph, intercept and analyze.” An intelligence agency with bloody hands — all intelligence agencies have bloody hands, of course — has become even more bloodied through blunders and a diversion of resources to increasingly eliminate, rather than assess, threats. We used to ship missiles to insurgents during the Cold War: now the CIA delivers them via drone. In both cases, we didn’t really keep good track of them (in the fog of two wars, some may have ended up in places like Ubeki-beki-beki-beki-stan-stan, while today they are mistakenly killing the wrong targets).

This fire and forget mentality stems in part from what happened to our intelligence services over Iran (and to a lesser extent, Lebanon) in the 1980s. This is very much the result of 9/11: the PATRIOT era begun by Bush (and expanded under Obama) hit Langley hard as the agency became increasingly politicized and scrutinized by the White House over al Qaeda activities and “Muslim” WMDs. So too did the FBI, NSA and National Security Council (NSC). But the basis for this approach to intelligence lies partly in Cold War Iran and Lebanon.

To say that U.S. covert operations in Iran and Lebanon have been marked by bad luck would be an understatement. Despite the importance of these two nations to U.S. grand strategy, the U.S.’s presence and influence in both countries has declined since the 1980s — or, to put it another way, these two countries wriggled out of the Eisenhower Doctrine bug jar since the 1980s.

From a “successful” little operation alongside the British known as “Operation Ajax” (aka, the 1953 coup that reinstalled the Shah), CIA successes in Iran have become few and far between. The botched rescue of the U.S. embassy hostages that resulting in the deaths of some of the would-be rescuers remains one of the defining image of the U.S.’s failure to effectively respond to the collapse of the Shah’s regime. Kept at arm’s length by SAVAK agents and Washington’s bureaucratic inertia, events outpaced the CIA there and we “lost” Iran, a perception that neither malwares, MEK nor mysterious murders have yet erased. But our successes there have accomplished little, save embolden the regime and rally the Iranian public around an establishment that many actually hate far more than they fear and loathe the U.S. and Israel. We might keep setting aside money and meetings in the name of “Iranian democracy,” but we can’t even protect the Green Movement from their own government’s webmasters.

Our historical failure in Iran contributed to the gung ho attitude that the CIA went into Afghanistan with in the 1980s. We might have lost one side of the Strait of Hormuz to the Islamists, but by Saud, Carter and Reagan we weren’t going to lose the other one to the Communists. What happened in Tehran colored our dealings with Islamabad, Quetta, Riyadh and Cairo during the Soviet-Afghan War, and many nations are still paying for our shortsighted approach towards those Islamists (it certainly didn’t help that some of those most heavily involved in these dealings all perished together in a mysterious plane crash alongside the Taliban’s godfather, Zia ul Haq).

Lebanon has also been a bit of a sore spot since the 1980s, partly because of high-profile kidnappings of Americans in Beirut, including that of a CIA station chief, and the fact that neither sanctions nor Israeli intervention has managed to topple Hezbollah, or at least isolate it from Iran. The global Islamist renaissance that began in the 1970s found fertile soil in war-torn Lebanon.

With this success against the CIA, Hezbollah has scored yet another victory against the U.S.-Israeli alliance, though not nearly as signal a success as the “Party of God’s” weathering of the 2006 Israeli offensive into southern Lebanon. Hezbollah’s survival frustrates both Washington and Tel Aviv — and the latter is increasingly looking back at the glory days of Operation Focus (1967) and Operation Opera (1981) as a means of dealing with its growing international isolation and regional upheavals. All the accompanying Churchillian references are not helping the matter.

The CIA does not have to worry too much that what happened in Lebanon and Iran this month will compromise its funding. It will, however, compromise its ability to deliver the White House objective intelligence and analysis from these countries at a bad time in Israeli and U.S. politics (i.e., the 2012 elections).

Take note, though, of who you start reading about in the papers as “sources” for U.S. intelligence. The news provided by the Ahmed Chalabis of the world is worse than no news at all. And with the operations inside these countries in bad shape — and chickenhawks being chickenhawks — we will be hearing from the new Ahmed Chalabis very soon on how to proceed in Iran.

If we aren’t already.

Paul Mutter is a graduate student at the Arthur L. Carter Journalism Institute at NYU and a contributor to Foreign Policy In Focus.