Skip to content

Compressing Long Sessions

Definition

A context-management pattern that summarizes earlier, resolved turns into a narrative description while keeping the full verbatim message history only for the active, unresolved issue, so a long multi-topic session survives context limits.

Key points

  • The challenge: A single session covers a refund inquiry, a subscription question, and a payment update across 48 turns; context limits approach.
  • Context window layout: Narrative Summary of Resolved Issues (compressed block) + Full Verbatim Message History + Active Issue (at the end).
  • The strategy: Summarize earlier, resolved turns into a narrative description, preserving the full message history verbatim only for the active, unresolved issue.

Why it matters for the exam

  • Tests the split treatment: narrative summary for resolved vs verbatim retention for the active issue — not blanket summarization of everything.
  • Numeric anchor: 48 turns across three distinct topics.

Common gotchas

  • Do not summarize the active issue — it stays verbatim; only resolved earlier turns get compressed.
  • (The deck slide repeats a mislabeled "Correct Pattern" line about isError — a copy-paste artifact from the Graceful Tool Failure slide; ignore it here.)

See also

Sources