Skip to content

Auto Compact

Long tasks keep filling the model’s context window. With Auto Compact on, Dline has the model summarize older conversation when the context nears its limit, and continues the task with the summary in place of that content.

Turn on Auto Compact under Settings → Features (“Automatically compress conversation history.”). It is off by default.

When it is on, these settings appear:

SettingDefaultDescription
Compression point (%)97Adjustable from 1 to 97; lower values compact earlier
Minimum reserve5KLower bound of the reserved space (K tokens)
Maximum reserve30KUpper bound of the reserved space (K tokens)
Maximum context0Absolute context cap (K tokens); 0 means no absolute cap

The trigger is not simply “97% used”. When the model’s context window is larger than Maximum context, that value becomes the window everything is measured against; the reserve derived from the percentage of that window is then clamped between the minimum and maximum reserve, exactly as for a model window of the same size. The trigger point is that window minus the reserve and a further 5.5K safety margin, and compaction starts as soon as the estimated next request reaches it. The estimation tolerance is already included in this point, so it does not move the trigger.

Invalid input shows “Reserve values must be whole numbers from 0 to …” or “Minimum reserve cannot exceed maximum reserve.”

  1. Dline instructs the model to write a summary covering your requests, technical details, and pending work. With Focus Chain on, the to-do progress also feeds the summary.
  2. A Summary card appears in the chat, showing the summary as it is generated and when it completes.
  3. From then on, what is sent to the model consists of the cumulative summary, the messages not yet covered by it, and the current continuation.

The full conversation record on disk is not deleted; only what is sent to the model gets shorter.

Below, “context window” means the model’s window, or the Maximum context value when it is set and smaller.

One compaction may run in several passes:

  1. Each pass starts from the oldest conversation not yet compacted and takes as many consecutive complete turns as fit without its input exceeding the trigger point, leaving the reserve for the summary. The one turn that crosses the trigger point may still join the pass if it takes no more than half of the reserve; no further turn follows it, so at least half of the reserve stays for the summary. This keeps a turn that only slightly overshoots in the same pass instead of starting another one.
  2. From the second pass on, the previous summary is carried along, so the summary accumulates pass by pass.
  3. A single turn that exceeds the trigger point by more than half of the reserve is split across passes by message, keeping each tool call with its result; its content is not truncated.
  4. A single message that is still larger than the trigger point is sent in a pass of its own, which may use the model’s full window minus 3K.
  5. After each pass, compaction stops and takes effect once what is sent falls below 80% of the context window, or once no uncompacted conversation remains.

Compaction does not fail because the context is still large. It ends without taking effect only if the summary request itself errors after its retries, or if you cancel it. The one exception is a single message larger than the model’s whole window: if earlier passes already completed, their result takes effect; otherwise Dline reports that the message cannot be compacted.

To keep long tasks running, the results returned by one round of tool calls, including parallel reads, commands, and subagents, add up to at most 80% of the context that remained when the round started. The running calls share that allowance; each time a result returns, the others are recalculated at once, and a subagent can see its current allowance. Each single result also keeps its own 64 KB cap. This allowance never changes when compaction triggers, how passes are formed, or when compaction stops.

When less than 3K of context remains, Dline ends the round and states that it will continue, keeping any undelivered subagent results aside. After automatic compaction completes, those results are delivered to the conversation and the task continues on its own; you do not need to send another message.

A summary is generated automatically near the context limit; after compaction, context usage drops and the task continuesA summary is generated automatically near the context limit; after compaction, context usage drops and the task continues

After compaction, the checkpoint next to the Summary card reads Compaction checkpoint. Clicking Restore offers only Restore Task Only: the conversation returns to before the compaction, and workspace files are unchanged. You cannot edit a message while restoring from a compaction card.

Whether or not Auto Compact is on, type /compact or /smol in the input box to compact the current task right away; see Using slash commands.

With Auto Compact off, Dline still trims by rules when the context nears its limit: it optimizes repeated file reads and removes older conversation turns, always keeping the first turn. This produces no summary, and removed content is not kept in any form in the context sent to the model.

Generating the summary is itself a model request, so it uses tokens and costs money like any other request and counts toward the task’s totals. The actual cost depends on your provider and caching.