adding while loop and timeout to AgentManager.join to catch Ctrl-C on python < 3