676d1e7645
Any event the node authored is eligible, including a plain text turn, which is all a non-resumable sub-agent may leave behind. Tool messages are excluded: a tool's user-facing message is authored under the agent's name and carries the agent's node path, but is published on `<tool>@<function_call_id>`, so a branch whose trailing id matches a function call in the session is skipped. Nodes are matched by static node path (run ids stripped), falling back to author/name for path-less legacy events, disambiguating sub-agents that share a name. At the resume sites the scan is scoped to the invocation being resumed; the new-invocation and live paths use the most recent matching event. This supersedes the earlier (unsubmitted) cl/944151553, whose path-matching and invocation-scoping approach is folded in here. Co-authored-by: Shangjie Chen <deanchen@google.com> PiperOrigin-RevId: 970044047