It’s called a “Doomed Spy,” and according to Sun Tzu, it is the most important of the 5 types of spies, as it is the necessary piece required to set the other types of spies in place.
https://www.infoplease.com/primary-sources/philosophy-religion/art-of-war/sun-tzu-art-warby-sun-tzu-3