MacBook – Applications on macbook pro close waking computer up after 1 hour lunch

macbook prosleep-wake

It's lunch time at work and I put my macbook in screen saver mode by using a hot corner. I return back to wake my computer up, and type in my password to resume work (I have the require password immediately after sleep or screen saver begins option checked.)
I then realise none of my applications are active whatsoever and it looks like a fresh restart has occurred.

I can confirm that: System Preferences > Security >> General >>> Log out after ... minutes of activity is not checked.

This is what my pmset -g look like:

System-wide power settings:
Currently in use:
 standbydelay         10800
 standby              1
 womp                 1
 halfdim              1
 hibernatefile        /var/vm/sleepimage
 powernap             1
 gpuswitch            2
 networkoversleep     0
 disksleep            0
 sleep                1
 autopoweroffdelay    28800
 hibernatemode        3
 autopoweroff         1
 ttyskeepawake        1
 displaysleep         10
 tcpkeepalive         1
 acwake               0
 lidwake              1

Can someone please help me fix this unwanted applications closing after my macbook pro goes to sleep when I return from lunch?

Additional information:
I can confirm that I also have two external monitors connected to my laptop via mini display ports, as well as an Anker usb host.

I have macOS High Sierra installed version: 10.13.4 (17E199)

I have a macbook pro Retina, 15 inch Mid 2015.

Not in clamshell mode.

Best Answer

Not sure what's going on with your settings, but I think you will find that caffeinate can prevent this behavior. At a terminal screen, type man caffeinate to learn about the utility. An option that may work for you is this:

caffeinate -s

Alternatively, if you have an application you wish to run while you are away from your Mac, you can use this form:

caffeinate -w PID &

where PID is the process ID of the app that's running (available via Activity Monitor, or ps -la), and & for running in background.