Long-running tasks
Use tmux so nothing stops when you disconnect
Section titled “Use tmux so nothing stops when you disconnect”tmux new -s work # start a sessionclaude # run Claude Code inside it# Ctrl-b then d: detach, the task keeps runningtmux attach -t work # pick up where you left offDropping SSH or closing your laptop doesn’t affect processes inside tmux.
Will auto-suspend interrupt it?
Section titled “Will auto-suspend interrupt it?”New machines do not auto-suspend by default — they stay up, so long tasks aren’t interrupted.
If you turned auto-suspend on, a machine only suspends after 20 minutes (configurable) of all of these at once: no connections, a nearly idle CPU and almost no network traffic. Claude Code has connections and traffic while it talks to the model, so it isn’t treated as idle.
Suspending doesn’t kill processes: memory is saved to the encrypted disk and loaded back exactly on the next connection.
Stay awake for a while
Section titled “Stay awake for a while”With auto-suspend on, to make sure the machine doesn’t sleep for a stretch:
hangar keep-awake 4h # up to 24 hours, reverts automaticallyhangar keep-awake off # cancel early