WhoBuilt

Why Bigger Context Windows Won't Save Your Agent

Oct 8, 2026· 16 min· 8.6K views·Watch on YouTube

Speaker

Elizabeth Fuentes Leone of AWS explains how to manage context in agent systems during an AI Engineer talk.

Why larger context is not enough

Fuentes Leone says agents can fail when tools return large amounts of data: context grows, answer quality degrades, and the model may hallucinate. She describes the attention U-curve, where models may use information at the beginning and end of a long context while missing its middle. Context engineering aims to provide relevant information when it is needed, while limiting exposure to irrelevant or harmful content.

Manage conversation history and memory

Using AWS-maintained, open-source Strands, she describes three conversation strategies: keep a sliding window of recent messages, summarize older messages, or combine both. Her example keeps the last four messages and summarizes older content at a 50% ratio. For information across sessions, she outlines short-term conversation history, long-term memory in a vector database, and relational memory represented with an entity graph.

Store large results behind pointers

For application logs, Fuentes Leone suggests saving tool results in storage and keeping a memory pointer ID in the agent state. The agent can work from a summary or retrieve the logs by ID when it needs more detail. She also describes sharing pointer IDs across agents so each agent can access the data without putting all of it in every agent's context.

Limit tool loops and handle slow APIs

She recommends setting maximum invocation counts to prevent an agent from repeatedly calling the same tool. Her example limits each search tool to three calls. For slow MCP tools or external APIs, she describes an asynchronous pattern with separate start-job and check-status tools, allowing the agent to retrieve results on a later invocation.

Keep only useful context

Fuentes Leone's closing guidance is to avoid context stuffing and give the agent only what it needs to answer the user's request. Summarization can reduce context, but may omit details the agent later needs. For large logs, database results, or alerts, she recommends externalizing the data, selecting relevant parts, and using a pointer.

Takeaways

  • Treat a larger context window as capacity, not a substitute for selecting relevant information.
  • Keep recent conversation in a short-term window and retrieve longer-term memory when needed.
  • Store large tool results externally and pass agents a pointer they can use to fetch details.
  • Set invocation limits to reduce the risk of repetitive tool loops.
  • Use asynchronous job patterns when external tools may take too long to respond.

Mentioned in this talk

Search inside this talk

What was claimed 9

Show all 9 facts

Related talks