# change to a newly created dir
mkdir /tmp/foo
cd /tmp/foo
# delete it while inside
rm -r /tmp/foo
# some debugging (not required to trigger the bug)
mkdir -p /tmp/foo/bar
pwd # sugests we are still in /tmp/foo
ls -lah # suggests we are not in /tmp/foo
# trigger error
exec zsh # shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
# observation: terminal interface is broken from now on