Unable to run 'display notification' using osascript in a tmux session

As @kopischke said, install or upgrade reattach-to-user-namespace may solve this problem.

If your reattach-to-user-namespace is old, notification works well after brew upgrade reattach-to-user-namespace.


Building on @snomof's answer, you'll want to install reattach-to-user-namespace through Homebrew or MacPorts and wrap the call to osascript:

reattach-to-user-namespace osascript  -e 'display notification "Hello, world"'