cleanup socket
Agent mode