Tools · 2026-10-08

A tool returns a 400 000-character log.

The run dies on context before the agent reads any of it.

  1. AMove to a model with a larger context window
  2. BTruncate the result to the first 1 000 characters and tell the agent the log was shortened, so it knows to ask the user for the rest if needed
  3. CHave the TOOL return a summary plus a handle, and let the agent ask for the part it needs
  4. DCompress the log before putting it in the context

Answer: C

Have the TOOL return a summary plus a handle, and let the agent ask for the part it needs

Why

The context is a working desk, not a warehouse. Truncation is the dangerous option: the answer is usually at the END of a log, so it fits and lies. A summary plus a handle keeps the whole log reachable without paying for it every turn.

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