I think I found a bug when leaving locked actor containers in the stdlib. When entering a closed/locked actor container there is a before-rule to check if the object is closed and an attempt to open it if that’s the case, but no such rule for leaving a closed container.
Here is small example code with the fix at the end (copied from the before rule) that imo is missing in stdlib.
(current player #player)
(#player is #in #room)
(room #room)
#container
(name *) container
(actor container *)
(openable *)
(* is unlocked)
(* is #in #room)
(narrate entering *)
(now) (* is closed)
%%(now) (* is locked)
You hear a loud noise, followed by a click as if something just locked up and you find yourself surrounded by darkness.
(before [leave (actor container $Obj)])
($Obj is closed)
(first try [open $Obj])
%% Test with: x container, enter container, look, exit