Skip to content

Context compaction in Praktik

When you use a Praktik legal AI agent for a longer task, you may see a note that compaction has occurred. This page explains what that means and why it can affect the agent’s performance.

AI agents do not remember a conversation in the same way a person does. For every answer, the underlying model receives a limited amount of text called the context window: your messages, the agent’s previous answers, tool results, document excerpts, legal sources, and system instructions.

Long legal research or document-review sessions can eventually approach this limit. Before the hard limit is reached, performance can already get worse because the model has more information to search through and less attention for each detail. Anthropic describes this as context rot: as the context grows, recall and reasoning over older details can become less reliable.

When the threshold is reached, Praktik may use compaction so the agent can continue the task.

Compaction means that the older conversation is summarized into a shorter form. That summary then replaces a large part of the raw history, so the agent can keep working instead of stopping.

A good compaction tries to preserve:

  • the user’s goal and constraints,
  • important decisions already made,
  • files, documents, legal sources, or document excerpts that were used,
  • current progress and unresolved tasks,
  • warnings, mistakes, citations, or edge cases that should not be forgotten.

Compaction is useful, but it is not perfect. A summary is lossy: it keeps the main points, but some nuance, reasoning, or small details may be removed. If a session is compacted repeatedly, those small losses can accumulate. The agent may become less precise, miss earlier context, forget why a legal source was used, or make assumptions that were already resolved.

You can continue in the same conversation after compaction, but for important work we recommend restoring the key context first:

  • ask the agent to summarize everything important you have found, agreed, or drafted so far,
  • ask it to include legal sources, citations, open questions, and assumptions,
  • for higher reliability, copy that summary into a new conversation and continue there,
  • if you continue in the original conversation, restate critical requirements and ask the agent to confirm them,
  • keep important facts outside the chat as well, for example in a document, matter note, or task.

Compaction helps Praktik agents continue beyond their normal working-memory limit, but it should be treated as a way to keep working—not as a guarantee that every detail is preserved forever.