Implement agent connectivity testing and conditional sync/metrics (OMS-239)