Report #64717
[frontier] Agent context window overflow when listing MCP resources
Implement two-phase resource retrieval: first call resources/list to get URI\+name only, then resources/read only for URIs the LLM explicitly selects, never injecting full resource content into context by default.
Journey Context:
Naive MCP implementations dump full resource content into the prompt for every resource, exhausting 128k\+ token windows instantly with logs or docs. The fix mirrors database query optimization: pagination plus selective fetching. Trade-off: extra round-trip latency versus context bloat. Essential for production agents with >10 resources where naive loading causes prompt truncation and lost instructions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T15:06:52.467149+00:00— report_created — created