There are two types of "spies" - official cover and non-official cover. Official cover is much more common.
Official cover spies work out of an embassy, typically with diplomatic immunity - although with a false agency (eg: Department of State instead of CIA). If they get discovered, they get sent home at the host country's request.
Non-official cover spies are more rare (for the US anyway) and it[']s riskier. If they get caught, they have no rights so the host country can do whatever it wants with them. Typically, they'll be jailed and used to get back the host country's captured spies in an exchange.
Governments may loathe spies to go public, as in the case of Alexander Litvinenko and Sergei and Yulia Skripal. Files can remain classified for many years. While former spies may be canny enough not to unveil or elaborate their former work, why aren't they required to keep (the fact of) their employment by agencies confidential? Can't enemies still exploit former employees? E.g. enemies can blackmail them especially if they get indebted, or clandestinely kidnap them to the enemy state and coerce them to divulge everything they know. E.g. Andrew Bustamanate admitted
to the question of "Are there REALLY big secrets that you know, that could land you/the country in terrible trouble if it came out to the public?" I'll cite some prominent examples of former spies.
- Ian Fleming.
- John le Carré who worked for MI5 and MI6.
- Jonna Mendez, former chief of disguise in the Central Intelligence Agency's (CIA) Office of Technical Service. WIRED features her in YouTube videos.
- Valerie Plame, CIA officer (1985–2006)
- Art Keller, Chris Burgess, Ren Stelloh
- Gene Coyle
"Restaurants and cafés are in many ways the lifeblood of espionage," is how Amaryllis Fox puts it. Fox was a real spy. Her memoir, Life Undercover: Coming of Age in the CIA, released this month, recounts her adventures as a clandestine CIA operative from 2003 to 2010 deployed to 16 countries to infiltrate terrorist networks in the post-Sept. 11 world.