From c6dc0c32c17865fea487d75169546664794a39d4 Mon Sep 17 00:00:00 2001 From: Nick Hollon Date: Fri, 8 May 2026 11:43:04 -0400 Subject: [PATCH] broaden graph_name docstring beyond add_node-only case The namespace segment name is whatever pregel registered the dispatching node as in the parent scope (`_algo.py:615`/`:988`), not specifically an `add_node` mount. For a subagent invoked from inside a tool's body, that's the tool's name; for Send fan-out, the target node's name. --- libs/langgraph/langgraph/stream/transformers.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libs/langgraph/langgraph/stream/transformers.py b/libs/langgraph/langgraph/stream/transformers.py index 605581c54..aacc01218 100644 --- a/libs/langgraph/langgraph/stream/transformers.py +++ b/libs/langgraph/langgraph/stream/transformers.py @@ -410,11 +410,10 @@ class LifecyclePayload(TypedDict, total=False): `started → terminal` pair for the same subgraph instance. """ graph_name: NotRequired[str] - """Compiled name of the subgraph (e.g. the `add_node` name in the parent). - - Set on `started` when the namespace tail segment carries a `name:id` - split (it does for normally-dispatched subgraphs). Absent if the segment - has no `:` separator. + """Name of the parent-scope node that dispatched this subgraph + (`add_node` name, surrounding tool's name for in-tool invokes, + `Send` target name, etc.) — parsed from the namespace tail + segment. Absent when the segment has no `:` separator. """ parent_task_id: str """Pregel task id of the dispatching task — the task whose execution