backend: automatically retry on idempotent commands