passdrill
AI & LLM Engineering · AI Agents & Tool Use · Card 017/022 medium

A coding agent has been working through a long refactor for hours. Its transcript -- every file it has read, every edit it has made, every command's output -- keeps growing with each step, and it is now approaching the model's context window limit even though the refactor is not finished. Rather than letting the request fail once the limit is hit, the harness periodically has the model condense the older parts of that transcript into a shorter summary of what has been done and what still remains, keeping the most recent, most relevant steps in full and folding the rest down. What problem does this address?

  1. That the model is physically unable to read more than a few hundred tokens of any tool output, regardless of how the transcript is managed
  2. That every tool call an agent makes must be executed twice, once for the model and once for a human reviewer, unless the transcript is condensed first
  3. That an agent's own working transcript keeps growing with every step it takes, and left unmanaged will eventually exceed even a large context window; periodically condensing older, lower-relevance steps down to a summary keeps the most useful information within the window instead of letting the request simply fail once the limit is reached
  4. That retrieval-augmented generation is required before any agent can be given more than one tool, and condensing the transcript is how that retrieval step is implemented
Next card → Shuffle