Mastra 1.57.0 adds processToolResult — a guardrail hook that scans tool output before the model ever sees it
Mastra shipped @mastra/core 1.57.0 on 2026-08-10 with `processToolResult`, a processor lifecycle hook running after each tool execution and before results enter message history, so you can scan for prompt injection or sensitive data, transform the payload, or abort the run pre-model. The same release adds transient agent signals (`transient: true`) that deliver per-turn reminder context without polluting stored memory, captures full tool JSON schemas as a `tools` attribute on MODEL_GENERATION spans for observability exporters, and cuts sandbox exec latency from ~400ms to ~16ms p50 via Railway private-network direct dial. The guardrail hook is the notable one: it puts the interception point at tool-result ingress rather than model output.
↳ Follow the thread