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

  1. Read my messages
  2. Close the Messages window with CMD-W
  3. Messages app is still running
  4. When a new message comes in, CMD-Tab to the still-open Messages app
  5. Press CMD-0 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 CMD-Tab 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:

  • I'm not in front of a Mojave machine at the moment to test if your workflow produces the same results at my end, but in the meantime at Step 2 of your workflow is there a reason why minimising the window instead of closing it wouldn't be a good option? I'll be able to test Mojave in the next hour though and will let you know what happens for me.
    – Monomeeth
    Nov 17, 2018 at 0:18
  • I think the only difference is cosmetic? I still get new message notifications regardless of whether the dock says it is open or closed. Nov 17, 2018 at 0:41
  • 1
    @Wowfunhappy In a mouse or notification-driven usage pattern it may be somewhat "cosmetic", but the app being removed from the CMD-Tab menu is a major functional change.
    – pkamb
    Nov 17, 2018 at 0:44
  • Ok, I've tested this at my end and the Messages app continues running for me even when I've closed the Messages window with the CMD-W shortcut. And, when I test your entire workflow it works fine for me. As a test, how about going through the process so that you've closed the Messages window and the Messages app icon disappears from the Application Switcher, but is still visible in Activity Monitor. Wait a few mins and then send a message to yourself from an other one of your devices (e.g. an iPhone). Does the Messages app on the Mac register that it's received a message?
    – Monomeeth
    Nov 17, 2018 at 1:44
  • 1
    I also use this workflow, except cmd-0. This automatic termination, which is also how Photos behaves is a strange, divergent UX for MacOS. I do not know how Apple decides which apps to do this with, and I think it was pretty lame to just change this behavior with no notification.
    – Rob
    Jun 11, 2019 at 16:51

3 Answers 3


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

  • 1
    This works! Thank you. I was having no success from similar answers that suggested NSSupportsAutomaticTermination. But NSDisableAutomaticTermination for the specific process does seem to disable the behavior.
    – pkamb
    Nov 17, 2018 at 19:42
  • @pkamb Instead of it being application specific (com.apple.iChat), you should also be able to disable it globally with the same command, but using -g instead of com.apple.iChat.
    – Redarm
    Nov 17, 2018 at 23:32
  • 2
    This works, key detail is Messages must be fully quit before the command is run. It should work once you restart Messages after.
    – Rob
    Jun 11, 2019 at 16:50

This is a bit of a strange one since it appears only to be affecting the Messages app and the Messages app appears to actually still be running in the background. Add to that the fact that I can’t reproduce it at all.

I have two potential solutions for you to try. You do not need to try these in any particular order - try one first and if the issue returns, then try the other.

Option 1: Reset and restart the Dock

One remedy is to reset and restart the Dock. However, in doing so, you will need to re-add any non-default icons to your Dock. (I usually find it's a good opportunity for people to start afresh and only add things as they actually use them).

You can reset and restart the Dock as follows:

  • Go to Finder
  • Press and hold the option key down
  • Now go to the Go menu
  • Select the Library option to open the User's Library folder. You can let go of the option key now.
  • Go to the Preferences folder (i.e. within the Library folder)
  • Find and move the com.apple.dock.plist file to the Trash
  • Now open Terminal (usually located in Applications > Utilities)
  • Enter this command killall -KILL Dock
  • Press enter

Remember you'll need to re-add some apps back to the Dock.

Option 2: Reset icon cache

You can also try resetting the icon cache.

  • Launch Terminal (usually found in the Applications > Utilities folder)
  • Enter the following three commands, one at a time:

    sudo find /private/var/folders/ \ -name com.apple.dock.iconcache -exec rm {} \;
    sudo find /private/var/folders/ \ -name com.apple.iconservices -exec rm -rf {} \;
    sudo rm -rf /Library/Caches/com.apple.iconservices.store

Let me know how you go.

  • Besides a Dock issue, this might be an AppNap issue or a LaunchServices issue. Nov 17, 2018 at 9:10

Redarm might work for iChat, but if you want this to have affect for other apps you can do the following just as simply by executing this command in the Terminal:

defaults write -g NSDisableAutomaticTermination -bool TRUE

I tried Redarm's answer on macOS Catalina and it failed to work; closing the window still completely quit the Messages app. After I run my command (above) it worked perfectly!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .