docs(website): filterSubagentMessages is a no-op for plain subgraph nodes - #842
Merged
Conversation
…odes The subgraphs post tells readers that child text lands in the parent transcript unless `filterSubagentMessages` opts out. That holds for a child dispatched from a `@tool` body, but not for the graph shape the post spends its best section on. `filterSubagentMessages` is checked inside a branch guarded by `isSubagentNamespace()`, which matches only `tools:`. A plain subgraph node emits `research:<uuid>`, never enters that branch, and so ignores the option entirely — its tokens merge into the transcript no matter how it's set. The lever for that shape is `transcriptNodeNames`. This matters because the post showcases `cockpit/langgraph/subgraphs`, which is exactly the plain-node shape. A reader who follows it, sees the child's brief appear as its own bubble, and reaches for `filterSubagentMessages` will find it does nothing. Also records the failure mode, which is the expensive part: the leak is mid-stream with a clean end state. The parent's final `values` event rewrites the message list from authoritative graph state, so the stray bubble disappears once the run settles. A final-state assertion cannot catch it — measured against a live model in #838, where the message count transiently hit 3 before collapsing to 2. Verified: website builds; blog + sitemap specs 26/26. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
This was referenced Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A correction to the subgraphs post that landed in #839.
The problem
The "Where child text goes" section tells readers child tokens flow into
messages()unlessfilterSubagentMessagesopts out. That's true for a child dispatched from a@toolbody. It is not true for a plain subgraph node — and that's the shape the post spends its best material on.A plain subgraph node emits
research:<uuid>. It never enters that branch, so the option is ignored entirely and its tokens merge into the transcript however you set it.transcriptNodeNamesis the lever for that shape.This matters specifically because #839 showcases
cockpit/langgraph/subgraphsas its clean look at the primitive — which is exactly the plain-node shape. A reader who follows that example, sees the child's brief render as its own bubble, and reaches forfilterSubagentMessageswill find it does nothing.The part that costs an afternoon
The leak is mid-stream with a clean end state. The parent's final
valuesevent rewrites the message list from authoritative graph state, so the stray bubble vanishes once the run settles. Assert on the finished DOM and everything looks correct.That's not inferred from reading the code — I measured it against a live model while building #838: without
transcriptNodeNamesthe message count transiently reached 3 and collapsed back to 2; with it, it never exceeded 2 at any sampled point. The aimock e2e passes either way, because fixture replay is atomic.Scope
Ten added lines in one section, matching the surrounding semantic-linefeed style. Nothing else touched.
Note on #840
I had a PR open with this post from an earlier draft. #839 landed first from a later, more developed version — it already covers the state-boundary mechanism, cites the new example, and adds the context-windows/error-boundaries section. Merging mine would have regressed the post, so I closed it and kept only the correction above, which #839 doesn't contain.
Verification
nx build websitegreen; post still prerenders at/blog/langgraph-subgraphs-when-to-splitwith its OG image.blog.spec.ts+sitemap-dates.spec.ts: 26/26.🤖 Generated with Claude Code