Quokkas

Female quokka's body can determine whether her offspring survived the encounter with a predator.

An excerpt from the article 25 facts about Quokkas
If not, the dormant embryo clambers into her pouch, and another joey is born a month after. In the case of the first joey’s survival, the embryo disintegrates after five months.