Notifications: agent notify reaches every device and clears everywhere

- Server: chat ntfy messages carry a sequence id derived from their app id;
  clearing a chat app notification also clears it in ntfy (PUT
  /<topic>/<seq>/clear, verified on ntfy v2.38.1).
- Server: a turn that sent an agent notify does not also send chat_reply.
- notify tool and MCP instructions: Pipelines already notifies at reply end
  and for questions/approvals; notify is for mid-turn or background news.
- Shown notify items carry channels (apps/phone); the transcript row says
  where it went.
- App: NotificationBridge.close(tag); web closes tracked Notifications and
  tells other tabs over a BroadcastChannel; native bridge cancels by tag and
  now supports macOS. AgentNotices closes on notifications_cleared and on
  resubscribe cleared ids, and a tap sends clear_notifications.
- Docs: skill, chat reference, ntfy/notifications docs, app note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-02 19:43:55 +00:00
parent c441400f36
commit b91ef04ab0
32 changed files with 743 additions and 73 deletions
+6 -2
View File
@@ -17,9 +17,13 @@ The same settings decide what is sent on both paths.
| Stage hook | a stage's own `notify` block fires ([ntfy reference](ntfy.md)) |
| Chat needs you | a chat asks a question or requests approval |
| Chat replied | an assistant turn ends (off by default) |
| Agent notification | a chat's agent calls its `notify` tool (always on; a turn that notified sends no separate "Chat replied") |
Each event notifies once. Opening or dismissing it on one device clears it on
the others.
Each event notifies once, on every device signed in (each web tab or installed
web app window, the Android app, the macOS app) and on ntfy. Opening the chat
or run, tapping the notification, or dismissing it in the app or the Android
notification shade clears it on every device, including the ntfy app for chat
notifications (see [Clearing notifications across devices](ntfy.md#clearing-notifications-across-devices)).
Chat events do not need the chat to be open. When the last app or browser
leaves a chat whose turn is still running, or which has an unanswered question