Iran discovered CIA agents' meeting places by using creative Googling skills and accessing a secret website used by the CIA for covert communications, obtained through a double agent. This allowed Iran's intelligence officers to find other websites with similar indicators.
This podcast episode talks about the techniques and strategies used by the CIA to recruit and surveil agents, as well as the failures and successes of their operations.