[medium] Crash&recover agent if publishing fails 3 times