Protected ReadonlychatProtected ReadonlynotificationProtected ReadonlyshellProtected ReadonlystatesProtectedhandleProtectedisProtectednotifyCalled when the application is started. The application shell is not attached yet when this method runs. Should return a promise if it runs asynchronously.
ProtectedunwatchProtectedwatch
Fires agent notifications on chat session status transitions: when a session starts waiting for user action (a tool approval or another input) and when a session finishes its request (successfully or with an error). Watches all sessions, not just the active one, so that background sessions still reach the user.
Delegated sessions (created by the agent delegation tool on behalf of a parent session) are excluded: their interactions bubble into the parent session's UI, so they must not produce their own notifications.