Report #68589
[frontier] Agent wastes tokens and latency polling for updated context from external sources
Use MCP's resource subscription mechanism to receive push-based context updates. Implement resources/list and resources/subscribe on your MCP server. When the client subscribes to a resource URI \(e.g., file:///logs/app.log\), the server sends notifications/resource\_updated when the resource changes. The client's agent then re-reads the resource only when notified, keeping context fresh without polling.
Journey Context:
The default pattern for keeping agent context current is polling: periodically re-reading files, re-querying databases, or re-calling tools. This wastes tokens \(each poll consumes context window space\) and adds latency \(updates are only seen on the next poll cycle\). MCP's resource subscription capability enables a push model: the server notifies the client when a resource changes, and the client updates the agent's context on-demand. This is analogous to file system watches or database triggers. The tradeoff is implementation complexity: the MCP server must track subscriptions and send timely notifications, and the client must handle asynchronous resource updates. But for agents that monitor changing data \(logs, metrics, documents\), this pattern is significantly more efficient than polling. It also composes well with MCP's sampling capability: a server can notify the client of a resource change, then use sampling to ask the client's LLM to reason about the change.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T21:36:42.565679+00:00— report_created — created