Back Home

GitHub Repo

Cline CLI 3.0.65 Adds Compaction Retries for Truncated Responses in Long Conversations

When plain-text generation hits the output limit, the new version first tries to free up context and retry. Turns with tool activity are excluded from replay through this mechanism, and the actual recovery rate remains to be measured.

Mattruffoni · CC BY-SA 4.0 · Image source
zh-Hant

Cline released CLI 3.0.65 on September 24, adding a compaction-and-retry flow for text responses truncated by the output limit. The maintainers noted that long conversations using llama.cpp, Ollama, or LM Studio can stop prematurely when insufficient context remains, failing midway through an answer even when the client is configured with a larger output budget. The new version treats these cases as recoverable within the execution flow. [CLI release notes](https://github.com/cline/cline/releases/tag/cli-v3.0.65)

The SDK 0.0.86 release notes define the boundaries: each run gets one additional retry after forced compaction, reusing the `prepareTurn` path for handling context overflow. Only when there is nothing left to remove, or the retry is also truncated, does the flow fall back to the existing concise-response prompt and retry mechanism. Partial answers are preserved even if the run ultimately fails. Turns that have already produced tool calls or provider-side tool activity are not replayed through this flow. [SDK release notes](https://github.com/cline/cline/releases/tag/sdk%2Fsdk%2Fv0.0.86)

This restriction has practical implications for coding agents. The flow's design reflects the need for different judgments when recovering plain-text generation and when repeating external operations: file writes, tests, or remote requests may already have occurred, so an incomplete answer alone does not justify rerunning the entire turn. The new `task.max_tokens_recovery` event provides `started`, `retried`, and `failed` statuses, allowing integrators to track recovery attempts rather than merely count whether a run ultimately reports an error. [SDK release notes](https://github.com/cline/cline/releases/tag/sdk%2Fsdk%2Fv0.0.86)

Version 3.0.65 is already listed on npm. The CLI can run interactively or integrate with scripts through JSON streaming. The existing `--compaction` option offers `agentic`, `basic`, and `off` modes, with `basic` using local truncation. This means operators still need to record their selected mode and model settings to compare recovery results under the same workload. [npm package documentation](https://www.npmjs.com/package/cline?activeTab=dependencies)

Local server capacity still needs to be checked separately. Ollama's documentation notes that expanding the context window increases memory requirements and that `ollama ps` can show the actual configuration and compute device. Accordingly, tests should record server capacity, conversation length, and output budget together. Simply raising client-side limits makes it difficult to determine whether the bottleneck is a generation limit or the server having exhausted its available context. [Context length documentation](https://docs.ollama.com/context-length)

The new version also preserves run failure messages when a conversation is reopened, while excluding these display-only records from model input and content used for compaction. Engineering tests should cover short responses, long text responses, and turns involving tools separately, checking that partial answers, error records, and external operations remain consistent. Compaction retries increase the chances of completing a task, but may still lose context or add latency. The release notes provide no success-rate or cost benchmarks. [CLI release notes](https://github.com/cline/cline/releases/tag/cli-v3.0.65)

Sources

  1. Cline CLI v3.0.65
  2. Cline SDK v0.0.86
  3. Context length