Skip to content

feat: desktop notifications via OSC 9#349

Open
jheronimus wants to merge 1 commit into
huggingface:mainfrom
jheronimus:feat/notifications
Open

feat: desktop notifications via OSC 9#349
jheronimus wants to merge 1 commit into
huggingface:mainfrom
jheronimus:feat/notifications

Conversation

@jheronimus

@jheronimus jheronimus commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

This is a minimalistic notifications feature. All it does is let the user know when the agent has ended its turn and waits for new input.

It uses OSC 9, so it is cross platform and should work with terminals that support it (Ghostty, iTerm2, Kitty, WezTerm, Warp). It is safe on terminals without support thanks to a \r\x1b[K cleanup sequence appended after the notification. It uses Textual's support of DECSET 1004 — which means the notifications only appear when the app is in the background.

The feature is turned off by default, you have to add "notifications": true to ~/.tau/tui.json for it to work.

New tests added, also tested it live in Ghostty: no false positives like in Antigravity (where the notification happens, but the agent isn't done yet) and no notifications when Tau is frontmost.

Also tested in Terminal.app to check that terminals without OSC 9 don't leak garbage into the UI.

@jheronimus
jheronimus requested a review from alejandro-ao as a code owner July 12, 2026 17:39
@jheronimus
jheronimus force-pushed the feat/notifications branch 3 times, most recently from f7ad69c to b22ef22 Compare July 16, 2026 20:16
Fires a desktop notification when the agent finishes its turn and the
terminal is not focused. Uses OSC 9 escape sequences — supported by
Ghostty, iTerm2, Kitty, WezTerm, and Warp. A \r\x1b[K cleanup
sequence appended after the notification prevents text leakage on
terminals without OSC 9 support (e.g. macOS Terminal.app).

Enabled via 'notifications: true' in ~/.tau/tui.json (default: off).
Suppressed via Textual's App.app_focus when the terminal is frontmost.
@jheronimus
jheronimus force-pushed the feat/notifications branch from b22ef22 to 7892798 Compare July 18, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant