MacOS – Prevent macOS Messages.app from quitting when I close its window

dockmacmacosmojave

I use a very specific workflow with the Messages app on the Mac:

  1. Read my messages
  2. Close the Messages window with CMDW
  3. Messages app is still running
  4. When a new message comes in, CMDTab to the still-open Messages app
  5. Press CMD0 to re-open the Messages window

After closing the Messages window, the app has always remained open and running in the Dock and app switcher.

Messages window closed, but App still running

In Mac OS 10.14 Mojave, I similarly close the Messages window. After closing the Messages window, the Messages app is still in the foreground, running, and shows the menu bar.

When I click to some other app, however, the Messages app then immediately seemingly Quits.

The dot disappears from the dock, and (this is the key issue) I can no longer CMDTab to the Messages app in the app switcher.

App has closed; no Dock dot

I'm forced to go click the dock icon with my mouse or otherwise re-open the app, which is inconvenient and annoying.

After the app has Quit, besides being "Quit", it seems to behave more-or-less exactly how it used to behave pre-Mojave. The Messages process is still running and visible in Activity Monitor. Notifications continue to arrive. The dock icon gets badged.

Activity Monitor

How do I prevent Messages from quitting when I close its window?

rdar://46142132 – Mojave Messages.app should not quit when I close its window

Engineering has determined that your bug report (46142132) is a duplicate of 42085189 and will be closed.

Related links:

Best Answer

As far as I can see that's just another case of "Automatic Termination", similar to Preview, QuickTime Player, etc.

If you launch Terminal (from /Applications/Utilities/) and run the following command with Messages quit, Messages should stop terminating, when the window is closed:

defaults write com.apple.iChat NSDisableAutomaticTermination -bool yes

Then press enter.

To undo it again: defaults delete com.apple.iChat NSDisableAutomaticTermination