* Truncate text block tool results in compaction
* Log context sizing diagnostics
* Use default reserve for compaction trigger
* Cap default compaction trigger at ninety percent
* Use provider-sized estimates for compaction
* Update manual compaction test for conservative estimates
* Truncate retained tool results during compaction
* Add live Codex compaction coverage
* Make basic compaction tool-pair atomic
Basic compaction's predicate-based removal could split a tool_use from its matching tool_result, leaving the assistant message with an orphaned tool_use. MessageBuilder then synthesized "Tool execution was interrupted before a result was produced." which the model echoed back to the user.
Make removal expand to all candidates linked by tool_use_id so tool_use and tool_result share a fate.
* Protect latest turn from basic compaction
* Extract token estimator to @cline/shared
agent-runtime had a local /4 estimator while compaction-shared had
a /3 estimator. Both compute the same concept (char-to-token rough
estimate) but with different bias. Reviewer noticed the discrepancy.
Centralize on /3 (slightly conservative, fires compaction trigger
earlier rather than later). Diagnostic logging in agent-runtime now
uses the same estimator, eliminating divergence.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* Snap agentic compaction cut to a turn-start boundary
findCutIndex previously walked back by token budget and could land
between an assistant tool_use and its matching user tool_result.
The tool_use ended up folded into the summary while the tool_result
was preserved in the tail, producing an orphaned tool_result that
the provider rejects with:
No tool call found for function call output with call_id ...
The same failure mode can occur in the inverse direction (orphaned
tool_use). Both leave the session unrecoverable.
Snap the cut to the nearest turn-start boundary at or before the
budget candidate. This keeps each turn — its typed user message
plus any tool_use/tool_result/assistant follow-ups — together,
either fully summarized or fully preserved.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
* add web search plugin example
* simplify web search plugin to exa
* make web search plugin installable
* clarify web search plugin CLI usage
* Address web search plugin review feedback
* chore: merge main into web search plugin PR
* chore: remove shared changes from web search PR
* docs: limit web search README changes
---------
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
* chore: rename and polish plugin examples
## Summary
Renames and reorganises the plugin example directories for clarity and consistency, and rewrites the top-level `plugins/README.md` to be more scannable:
- `weather-plugin.example.ts` → `weather-metrics.ts`
- `subagent-plugin/` → `agents-squad/` (package renamed to `cline-agent-squad-plugin`)
- `typescript-lsp-plugin/` → `typescript-lsp/`
- Drops `maxIterations` caps from agent preset frontmatter (`anvil`, `oracle`, `phantom`, `inquisitor`)
- Bumps `inquisitor`'s model from `gpt-5.4` → `gpt-5.5`
- Removes the inline standalone demo from `typescript-lsp/index.ts` (was duplicating the pattern already in `weather-metrics.ts`); export surface trimmed to just `plugin`
- Removes the `AgentExtension` duplicate export and adds a `Logger` alias for `BasicLogger` in `@cline/core`'s public index; also drops types that leaked into the published surface
* path updates
* rename folders
* fix examples reorg references
* move over files
* having agent fixing and validating all examples are still working
* fix sidecar paths
---------
Co-authored-by: abeatrix <beatrix@cline.bot>