When do rescue missions have an agent as the hostage?

When I've done rescue missions, I've always had less than 4 agents, so the prisoner always seemed to end up being an agent that I could add to my team.

Once I've reached the max of 4 agents, is it possible to add more agents as "reserve" agents by doing more rescue missions, or do the rescue missions only have sellable hostages at that point?

If I end up having to leave my 4th agent behind on a mission, does the next rescue mission have that agent being held prisoner, or is it a new random agent, or is it a sellable hostage?


Once I've reached the max of 4 agents, is it possible to add more agents as "reserve" agents by doing more rescue missions, or do the rescue missions only have sellable hostages at that point?

The game actually does a neat trick (at least from what I've could read in five minutes). Per default, the mission will contain only a prisoner. Only when you open the actual room, the game will randomly decide whether the prisoner is an agent or a regular hostage.

The associated file contains the following lines in the swapping function (mission_detention_centre.lua):

local unit = mission_util.findUnitByTag( sim, "prisoner" )
if unit == nil then
    return -- No prisoner to swap?!
end

if #sim:getPC():getAgents() >= simdefs.AGENT_LIMIT then
    return -- Maxxed out agents
end

whereas AGENT_LIMIT is set to 4 in simdefs.lua. So if you have four agents then a rescue missions will always contain a sellable hostage.