This setup ensures Google Chat is always running on macOS.
If the app crashes or is accidentally closed, it will automatically restart.
Unlike open -a, this method avoids stealing focus every time Google Chat launches.
-
Open Terminal and create a LaunchAgents folder (if it doesn’t exist):
mkdir -p ~/Library/LaunchAgents -
Create a new service file:
nano ~/Library/LaunchAgents/com.user.googlechat.plist -
Paste the following content:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.user.googlechat</string> <key>ProgramArguments</key> <array> <string>osascript</string> <string>-e</string> <string>tell application "Google Chat" to run</string> </array> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/> </dict> </plist>
-
Load the service:
launchctl load ~/Library/LaunchAgents/com.user.googlechat.plist
- Now, Google Chat will always stay open.
- If you close it manually or it crashes,
launchdwill restart it automatically. - To disable the service:
launchctl unload ~/Library/LaunchAgents/com.user.googlechat.plist
- Works with the official Google Chat desktop app (from Google).
- If you’re using Chrome PWA, adjust
tell application "Google Chat"to match your PWA app name. - Unlike
open -a "Google Chat", this solution prevents the window from becoming active on each restart.