if necessary, copy buildAgent to new buildAgent