Report #77450
[frontier] Agents poll MCP servers for updates, causing latency and stale context when external state changes during long agent runs
Use MCP Resource Subscriptions: implement \`resources/subscribe\` to register for push notifications, handle \`notifications/resources/updated\` to invalidate agent cache, and re-retrieve critical resources mid-execution when receiving change notifications
Journey Context:
Polling creates race conditions where agents act on stale data \(e.g., reading a file that changed after the agent started, or querying a DB state that was updated by another process\). Unidirectional tool calls assume static state for the duration of the agent loop. MCP Resources with subscriptions turn servers into reactive streams; when a backend database updates, subscribed agents receive push notifications and can trigger context invalidation. This enables 'live' agents that maintain consistency with external systems without blocking on polling loops, allowing agents to react to real-time events like stock price changes or file modifications within a single long-running session.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:36:07.724653+00:00— report_created — created