When Cai Yuanchang (i.e., Cai Jing 蔡京, 1047-1126 CE) held power, he ate quail at every celebration. One evening, he dreamt that a yellow-robed old person said: “In the coming days you are to suffer murder; hopefully the gentleman may be spared this fate.” Cai asked: “What kind of person are you?” They then recited verses:
Several grains of millet could feed the gentleman;
Only meat in the congee can fill the gentleman.
For one congee several lives are cut short;
Putting down his chopsticks these are still not enough.
On the moments between mouth and stomach;
Fate and fortune are together dependent.
Wishing to warn the gentleman not to kill;
Life and death spin as if on a wheel.
He awoke and marvelled at this, making enquiries to those who prepared meals, acquiring several dozen yellow quails and releasing them. During the night he again dreamt of the yellow-robed old person, who said: “I am aware that the gentleman fulfilled the prayer, and has already saved lives. The Heavenly Emperor has now granted an extension to the gentleman’s lifespan.” Cai indeed subsequently enjoyed a long life before he passed away.
Anon., Huhai xinwen yijian xuzhi, 前2.114 (Tale 199):
Yuan Haowen 元好問, Chang Zhenguo 常振國 (ed), Xu Yijian zhi 續夷堅志 (Continued Records of the Listener), and Anon., Jin Xin 金心 (ed.) Huhai xinwen yijian xuzhi 湖海新聞夷堅續志 (Continuation of Records of the Listener with New Items from the Lakes and Seas) (Beijing: Zhonghua shuju, 1986)
 On Cai Jing 蔡京, courtesy name Yuanchang 元長 (who died after banishment at a relatively advanced age) see https://en.wikipedia.org/wiki/Cai_Jing and the brilliant article by Charles Hartman, ‘A Textual History of Cai Jing’s Biography in the “Songshi”’, in Emperor Huizong and Late Northern Song China: The Politics of Culture and the Culture of Politics (Cambridge, MA: Harvard University Press, 2006), pp. 517-64.