Complex sentence: An illegal resident is a spy who operates in a foreign country, but without the cover of his embassy; thus, he cannot claim immunity from prosecution when arrested.
Split into simpler sentences: An illegal resident is a spy who operates in a foreign country but without the cover of his embassy. Thus he cannot claim immunity from prosecution when arrested.