Quick example with OSC 777
Run this only in a Bubble SSH terminal. It prints an OSC control sequence with a title and body; Bubble SSH consumes it and shows an Android notification.
printf '\033]777;notify;Deploy complete;Production finished successfully\007'Supported notification forms
Bubble SSH recognizes three OSC codes. Your shell or program must write the sequence to the connected terminal exactly as bytes.
- OSC 9: the payload becomes the notification body
- OSC 99: supports metadata, title/body parts, optional Base64 content, and multipart IDs
- OSC 777: expects notify;title;body, or notify;body when no title is needed
Why notifications may disappear inside tmux
Terminal multiplexers decide which control sequences reach the outer terminal. Standard tmux setups commonly do not pass these OSC notification sequences through, so Bubble SSH never receives them.
If you need both a persistent server-side session and Bubble SSH notifications, use a multiplexer that transparently forwards OSC sequences, such as zmx, or configure and test an explicit passthrough suitable for your environment.
Use notifications for completion, not streaming logs
A notification works best for a meaningful state change: a deployment completed, a backup failed, or a long build finished. Keep regular progress in the terminal and emit one bounded message at the end.
- Keep title and body short
- Avoid repeated notifications inside tight loops
- Never include credentials or terminal output by default
- Test while the bubble is collapsed and while another app is foreground