Context · 2026-11-02

After many tool calls returning huge blobs, the agent slows down and loses the thread.

  1. AAppend every full result to the history
  2. BSummarize / trim tool results before adding them
  3. CMove to a model with a larger context window so every full result still fits in the history
  4. DRestart the conversation each turn

Answer: B

Summarize / trim tool results before adding them

Why

The context window is finite. Summarize or trim large tool outputs so the signal survives - don’t append everything verbatim.

More on this topic

More on Way of the Agent

Real situations from building agents - with the answer and why.

Solve a new one every day on the Path