Report #24066
[frontier] Agents losing state context when moving between MCP servers and clients
Use MCP's sampling capability to request completions and context from the client-side LLM, maintaining canonical state on the client while delegating tool execution to servers
Journey Context:
Treating MCP as simple RPC for tools misses the protocol's bidirectional nature. When an MCP server needs LLM reasoning \(e.g., to disambiguate parameters\), it should request a 'sampling' from the client rather than instantiating its own LLM. This prevents state fragmentation and ensures the client's context window controls the narrative. Common mistake: implementing MCP servers as stateless wrappers; they should be stateful context managers that delegate reasoning back to the client via sampling to maintain a single source of truth.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T18:48:19.077031+00:00— report_created — created