Pg-archivecleanup Must Specify Oldest Kept Wal File ◉ «RECENT»
This is used on a standby and can automatically remove WAL files that are no longer needed. However, the %r macro must be properly resolved by the recovery process—if not, you may still see the error.
Look at your archive directory: