Skip to content

docs(website): filterSubagentMessages is a no-op for plain subgraph nodes - #842

Merged
blove merged 1 commit into
mainfrom
blove/subgraphs-blog-post
Aug 28, 2026
Merged

docs(website): filterSubagentMessages is a no-op for plain subgraph nodes#842
blove merged 1 commit into
mainfrom
blove/subgraphs-blog-post

Conversation

@blove

@blove blove commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

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() unless filterSubagentMessages opts out. That's true for a child dispatched from a @tool body. It is not true for a plain subgraph node — and that's the shape the post spends its best material on.

if (isSubagentNamespace(namespace)) {   // matches only `tools:`
  
  if (options.filterSubagentMessages) return;
}

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. transcriptNodeNames is the lever for that shape.

This matters specifically because #839 showcases cockpit/langgraph/subgraphs as 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 for filterSubagentMessages will find it does nothing.

The part that costs an afternoon

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 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 transcriptNodeNames the 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 website green; post still prerenders at /blog/langgraph-subgraphs-when-to-split with its OG image.
  • blog.spec.ts + sitemap-dates.spec.ts: 26/26.

🤖 Generated with Claude Code

…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>
@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview Aug 28, 2026 4:09am

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant