Originally from https://youtrack.jetbrains.com/issue/TW-49809:
This feature would be especially useful for dynamically created cloud agents in order to provide meaningful names to the end users. In my particular case, I would like the agent name to contains a reference to the hosting Docker container.
It is currently possible to set an agent's name at registration time, by using the BuildAgentInit.setName() method. This class is however part of the server JAR and not the public API.
Having some way to deal with duplicated agent name would also be helpful. When using the BuildAgentInit.setName() method, it is the responsibility of the caller to provide an unique agent name, which can be tricky to achieve.