The Silent Shutdown
macOS employs aggressive, under-the-hood memory management to keep the system feeling snappy, especially on older MacBooks with limited RAM. One of the mechanisms it uses is called “Sudden Termination.” If the operating system detects that you have not interacted with a specific application for an extended period, and the system is currently under memory pressure, macOS will quietly quit the inactive application in the background to free up resources. While Apple intends this to be seamless (the app should theoretically restore its state when you click its icon again), it often leads to frustrating delays as the app essentially cold-boots, or worse, results in lost unsaved data in poorly optimized software.
Disabling Sudden Termination
To prioritize application persistence over aggressive memory management and stop macOS from automatically quitting inactive apps, you must disable the Sudden Termination feature using a terminal command.
There is no graphical toggle for this deep system behavior. You must open the Terminal application (found in Applications > Utilities, or by searching Spotlight). Once the Terminal window is open, type the following exact command: defaults write -g NSDisableAutomaticTermination -bool true and press Enter. The command will execute silently without providing a confirmation message. To ensure the change takes effect across the entire system, you must either log out of your user account and log back in, or completely restart your Mac. From this point forward, macOS will respect your open applications, allowing them to remain running in the background indefinitely until you explicitly press `Cmd + Q` to quit them.