Cool isn't it?
If you are running only one script or program and want the session to exit after completion, you can launch it like this:
Originally Posted by mErchamion
Then when the script ends, the session ends.
tmux new-session -n myscript "/some/path/to/script"
Or if you are running with escalated privileges inside tmux you can use sudo to launch the script. Then after 15 minutes (if you haven't changed the default) the password will be needed again, unless you clear it with 'sudo -k' first.