Michael Rubin at Commentary asks why we allow immigrants (especially, in this case, from Iran) to remain in the United States if they betray their new citizenship by acting as subversives for Iran? It's not a new problem. During the Cold War the Communists had a very active program to infiltrate the United States with subversives. Much subversion is protected First Amendment activity. You can say what you want, print what you want, organize for the purpose of effecting political change, and in the case of Iran's revolution, your freedom of religion entitles you to adhere to revolutionary Shi'a Islam if you want. You can advocate for the non-violent transition of the United States to a Communist country, or to an Islamic one.
We don't have a good answer, and I doubt we're going to develop one given that we never did before. Protecting our liberties is generally accepted as more important than protecting ourselves from subversive acts by immigrants. Besides, why get worked up about native Iranians who advocate for Iran when you have Vox and the New York Times?
UPDATE: None of the freed Iranians in the 'prisoner swap' elected to go home to Iran.