In espionage jargon, a mole is a long-term spy sleeper agent
In espionage jargon, a mole (also called a “penetration agent”, “deep cover agent”, “illegal” or “sleeper agent”) is a long-term spy (espionage agent) who is recruited before having access to secret intelligence, subsequently managing to get into the target organization. However, it is popularly used to mean any long-term clandestine spy or informant within an organization (government or faction). In police work, a mole is an undercover law-enforcement agent who joins an organization in order to collect incriminating evidence about its operations and to eventually charge its members.
The term “mole” is a metaphor, considering that is a Real World animal that digs tunnels underground and lives in them, called Mole. The metaphor plays with this aspect of the animal being underground, undetected, hidden, waiting to act. These species was very mistreated and treated like a pest by humans, so surely came to the surface when they were not in the vicinity of its habitat.
The term was originally first introduced by a human, the spy novelist John le Carré in his 1974 novel “Tinker Tailor Soldier Spy” in the Real World (when humans still existed) and has since entered officially in general usage by the Army Men. But its origin in the Plastic World was before the discovery of the Real World. So it’s unclear, but was used to refer mostly to Blue Spies. It’s unknown from where this came and to what extent it was used by intelligence services before the Real World, that make the term more popularized. Le Carré, a former human intelligence officer, had said that the term mole was actually used by human intelligence agencies, like the other analogy of the term: sleeper agent. While the term mole had been applied to spies in the book “History of the Reign of King Henry VII” written in 1626 by Sir Francis Bacon, Le Carré has said he did not get the term from that source.