Currently we identify an agent based on what it is called in /vsmserver/terminalservers. This is not terribly robust as simply switching between IP and a hostname, or from a short name to a FQDN, is sufficient to confuse the master and think this is a different agent. More complex things like giving an agent a new name/IP is also problematic.
We should start identifying agents on something that is more persistent than their network identity. A simple solution is that an agent simply generates a random id and stores it on disk. This id can then be included in the protocol and the master should be able to keep track of each agent.
We should probably store this id in /var/opt/thinlinc to avoid getting it rsync:ed between agents.