If you are a spy for side A, you are called “a spy.”
If you are turned by side B against A, you are then a “double agent.”
So, what are you called if:
Side A finds out you are working for Side B, so they turn you again so you feed false information to Side B under the pretext of spying on Side A? Are you just “a spy” again since you returned to Side A? Are you a triple agent?
Side B sends their double agent from Side A to spy on Side C. What are they called now?
The term is re-doubled agent. A triple agent actually works for 3 separate agencies (countries, groups, whatever.)
Triple agent is a common term in fiction, even for redoubled agents, say for example, Severus Snape in the Harry Potter series. It just sounds cooler, I guess, in a literary source, that we never really know a person’s motivations, even though we’re privy to their deepest thoughts. Unlike real life spies, whose motivations aren’t really known.