fix magic agent linker to only use the latest socket