Report #41281
[frontier] How do I keep an agent's context up-to-date with changing resources \(files, databases\) without constant polling that wastes tokens and API calls?
Implement MCP Resource Subscriptions: use resources/subscribe to register for server-push notifications when specific resources change. Maintain a local cache with ETag validation, update the agent's context only when notified of changes, and unsubscribe when the context switches.
Journey Context:
Traditional RAG and context management require polling \(expensive, laggy\) or manual refresh \(bad UX\). The MCP 2025-03-26 spec introduced resource subscriptions, allowing servers to push updates to clients when resources change \(via notifications/resources/updated\). This enables real-time agents working with dynamic data \(live docs, stock tickers, file systems\) without waste. Tradeoff: requires persistent connection \(SSE\), servers must implement change detection. Alternatives: Polling \(inefficient\), manual refresh \(stale data\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:45:58.388858+00:00— report_created — created