Meaning: Patching the hole on a cage after a goat in there has escaped
Usage: This idiom can be used as either a verb or an adjective to describe someone correcting a mistake after done damage to prevent even bigger losses.
In the Warring States Period (戰國時代 / 战国时代 476 – 221 B.C.), the king of one of the states, Chŭ (楚國 / 楚国), was so consumed in his comforting lifestyle that he completed neglected his duty as a king.
One of the liegemen of Chŭ (楚國 / 楚国), Zhuāng Xīn (莊辛 / 庄辛), tried to exhort the king and said: “My lord, if you continue this course of action, our state, Chŭ (楚國 / 楚国), will be annihilated very soon.”
The king did not believe in Zhuāng Xīn’s (莊辛 / 庄辛) words and replied: “We are not at war with any state right now. Everything seems to be peaceful and quiet. You are worrying too much.”
Zhuāng Xīn (莊辛 / 庄辛) then said to the king: “My lord, since you do not believe my words, please allow me to leave the state of Chŭ (楚國 / 楚国), and we can both see how things would turn out to be.”
So the king granted Zhuāng Xīn (莊辛 / 庄辛) his request, and five months after, Chŭ (楚國 / 楚国) was attacked by another state, Chín (秦國 / 秦国). The king of Chŭ (楚國 / 楚国) fled from his palace and regretted the mistakes he had made, so he sent a herald to bring Zhuāng Xīn (莊辛 / 庄辛) back.
When Zhuāng Xīn (莊辛 / 庄辛) returned, the king apologized to him and asked for his advise. So Zhuāng Xīn (莊辛 / 庄辛) replied: “My lord, it is still not too late to patch the hole in a cage even after a goat has escaped. As long as you start doing the right things now, we can bring our state back to strength.”
The king listened to Zhuāng Xīn’s (莊辛 / 庄辛) advise this time and started focusing on his duties as a king. Within a few years, the state of Chŭ (楚國 / 楚国) became powerful again and took back the lands that were once occupied by the state of Chín (秦國 / 秦国).