fix(python-sdk): track recursive subagent notifications

This commit is contained in:
Yichen Jiang
2026-07-24 11:23:16 +08:00
parent bc7a89b81f
commit b9f8eca10c
9 files changed
+204 -21

No files matched your search

+4 -1
View File
@@ -143,7 +143,10 @@ class Session:
notifications.append(notification)
if on_notification is not None:
on_notification(notification)
if notification.method == "session.event":
if (
notification.method == "session.event"
and notification.payload.get("sessionId") == self.id
):
event = notification.payload.get("event")
if isinstance(event, dict):
events.append(event)