From the shiurim of Rabbi Elchanan Peretz shlita on monetary law, damages and the laws of robbery
A person who guarded his animal properly and his yard or door was breached at night, or the animal dug through and left and caused damage – is exempt from payment, and even if he learned at night that it escaped, he is not obligated to leave his house and exert himself to chase after it in the dark. However, if it was breached during the day and he learned of it – he is obligated to chase after it and guard it.
Explanation of the sugya and the ma’aseh from the shiur:
A major principle in the laws of damages was established based on the words of the Netivos HaMishpat (siman 155): The Torah and Chazal did not obligate a person in shemirah or in pursuit that is unreasonable. A person is not required to endanger his body or to get up in the middle of the night and wander the dark roads full of pits and obstacles in order to chase an animal or a bee that fled.
The shiur cited a story/parable from Birkas HaLevanah (“Kiddush Levanah”): In Birkas HaLevanah we say "תיפול עליהם אימתה ופחד... שלום עליכם" (ברכת הלבנה). HaGaon Rabbi Isser Zalman Meltzer zt”l and Maran HaGaon Rav Elazar Menachem Shach zt”l explained this on the basis of the ma’aseh of one who went at night on dark roads to look for the moon. Walking at night on desolate roads arouses great fear, and when one meets another person in the darkness, one says to him “shalom aleichem” in order to calm the anxiety.
Therefore, regarding an animal or bees that fled at night, since it is not the way of people to wander in the dark and endanger themselves, the owner is exempt from their damages because the oness that occurred at night does not obligate him to an unreasonable pursuit.
(Sources: Shulchan Aruch, Choshen Mishpat 396:2; Netivos HaMishpat, Choshen Mishpat 155, se’if katan 1; and Shulchan Aruch, Orach Chaim 426.)
The answers were compiled from the shiurim of Rabbi Elchanan Peretz shlita and from rulings he received from HaGaon Rabbi Chaim Pinchas Scheinberg zt”l and from leading poskim, and are for study purposes only. One may not rely on what is stated here for practical halachic ruling; for a personal question, one should consult a rav or a Beit Horaah.