The Silent Termination
In an effort to ruthlessly optimise battery life and RAM usage, modern versions of macOS employ a background daemon known as “Automatic Termination.” When the operating system detects that you haven’t interacted with a specific application for an extended period, and the system is under memory pressure, macOS will simply terminate that application without warning. While this is helpful for lightweight utilities, it is catastrophic if you have left a complex render, a lengthy database query, or a multi-gigabyte file transfer running in the background while you stepped away for a long lunch, only to return and find the app closed and your progress lost.
Overriding Automatic Termination
To ensure your critical applications remain running exactly as you left them, regardless of how long they sit idle in the background, you must disable the Automatic Termination daemon at the system level.
Because Apple does not provide a standard graphical toggle for this feature in the System Settings, you must use the Terminal to modify the global defaults. Open the Terminal application (found in Applications > Utilities, or via Spotlight search). At the command prompt, type the following command exactly as written, paying close attention to the capitalization: defaults write -g NSDisableAutomaticTermination -bool true. Press Enter. The command will execute silently without outputting a confirmation message. To ensure the new policy is applied to all applications, you must either log out of your user account and log back in, or simply restart your Mac. From this point forward, macOS will respect your open applications and will never silently quit them in the background.