Problem
When an agent chat in T3 Code stops and waits on the user — a permission/tool-approval request, a question from the agent, or a finished turn — there is no proactive signal. If you're in another app (desktop) or have the tab in the background (web, including using T3 Code from a phone browser over Tailscale), you don't find out until you manually check. Long-running turns make this worse: you either babysit the window or lose minutes/hours of turnaround time.
Goal
Fire a notification whenever a chat transitions into a state that needs the user, on both surfaces:
- Desktop app (Electron): native OS notification (plus platform niceties where cheap, e.g. macOS dock bounce/badge). Clicking it focuses the window and opens the chat that needs input.
- Web app (desktop or mobile browser): Web Notifications API. Ask for permission at a sensible moment (not on load), fire notifications from the client when a background tab's chat needs input, and clicking one focuses the tab and navigates to that chat.
Requirements
- Trigger on the "needs input" transitions: agent asks a question / requests tool or permission approval, and turn completion (agent idle awaiting next message).
- Suppress notifications when the relevant chat is already visible and the window/tab is focused.
- Identify the chat in the notification (title/workspace) so multiple concurrent sessions are distinguishable; clicking navigates to the right chat.
- A settings toggle to enable/disable notifications (per surface is fine), persisted.
- Sensible permission UX on web: prompt contextually, handle denied/unsupported gracefully (feature silently off).
- No server-push infrastructure required for v1 — the web client already holds a live connection; fire client-side. (Mobile browser gets notifications while the tab is open in the background; true closed-tab push is out of scope.)
Out of scope (v1)
- Web Push (closed-tab) notifications, email/SMS, notification history/center.
Testing expectations
Unit tests for the trigger/suppression logic on both surfaces, plus verification in the running app before merge.
Problem
When an agent chat in T3 Code stops and waits on the user — a permission/tool-approval request, a question from the agent, or a finished turn — there is no proactive signal. If you're in another app (desktop) or have the tab in the background (web, including using T3 Code from a phone browser over Tailscale), you don't find out until you manually check. Long-running turns make this worse: you either babysit the window or lose minutes/hours of turnaround time.
Goal
Fire a notification whenever a chat transitions into a state that needs the user, on both surfaces:
Requirements
Out of scope (v1)
Testing expectations
Unit tests for the trigger/suppression logic on both surfaces, plus verification in the running app before merge.