Report #30949
[frontier] Sub-agent delegation inflates parent context window with intermediate reasoning steps
Use MCP Sampling to offload sub-agent reasoning to an external MCP server, returning only the final result to the parent via the sampling callback mechanism.
Journey Context:
Direct tool-calling forces the parent agent to consume the full context of sub-agent reasoning chains, quickly exhausting context windows. MCP Sampling inverts this: the server \(sub-agent logic\) requests completions from the client \(parent/host\), allowing the sub-agent to maintain its own state and reasoning loop externally. This avoids the 'matryoshka doll' context explosion when nesting agents. Tradeoff: requires MCP 2024-11-05\+ support and careful handling of the sampling callback in your host; latency increases slightly due to round-trips.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:20:14.506990+00:00— report_created — created