Check the related issue #2366, issue tracker, phantom cached and empty processes docs and this TLDR comment on how to disable trimming of phantom and excessive cpu usage processes. You may get message in the terminal without actually exiting the shell process yourself.
Android OS will kill any (phantom) processes greater than 32 (limit is for all apps combined) and also kill any processes using excessive CPU. NOTICE: Termux may be unstable on Android 12+. We are looking for Termux Android application maintainers. It also has info on how to fix repository is under maintenance or down errors when running apt or pkg commands.
Quick how-to about Termux package management is available at Package Management. For the packages installable inside the app, see termux/termux-packages. Note that this repository is for the app itself (the user interface and the terminal emulation). Termux is an Android terminal application and Linux environment.