Paths Subjects Questions Quizzes Pricing Search
Advanced Open Pro

Choosing a Compaction Strategy for a Long-Running Agent

You're building an agent that helps engineers debug production incidents. A session can run 60+ turns: the agent runs commands, reads logs, forms hypotheses, and reports findings. Conversation history at turn 60 would be roughly 90,000 tokens if kept verbatim — well past your 20,000-token practical budget for this endpoint. You need a compaction strategy.

  1. Compare truncation, prose summarization, and structured notes for this specific use case (a debugging agent), and recommend one — justify against what a debugging session actually needs to preserve, not compaction methods in the abstract.
  2. Your recommended approach still needs a concrete update policy — when does compaction run, and what triggers it? Propose one.
  3. Identify one specific piece of information a debugging session would be at high risk of losing under your recommended approach, and propose a mitigation that doesn't just mean "compact less aggressively."

Share this question

← Back to Context Engineering Fundamentals practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.