0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00

fix(core): slim delegated chunks in the replay cache only, not the live stream

Review on #29151 showed that slimming in emitChunkEvent changed what a
DurableAgent/EventedAgent caller sees on its own fullStream: the run topic
is both the caller's stream and the cached log, so nested sub-agent
messages and steps vanished and parity-sub-agent-delegation failed on both
engines.

CachingPubSub now stores a slimmed copy of delegated agent chunks in an
agent stream's cached log (toCachedLogFrame next to cachedLogTtlMs) and
publishes the event unchanged to live subscribers. The plain Agent
publisher keeps main's slimming as before.

Fixes #29035

Co-Authored-By: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
This commit is contained in:
mastra-platform[bot] 2026-11-12 04:03:10 +00:00
commit 3124778520
6 changed files with 42 additions and 13 deletions