Expand description
Tool output pruning.
When conversation history grows long, older tool call outputs are marked as “pruned” — their content is replaced with a placeholder string to free context tokens without permanently deleting data.
Pruning is distinct from compaction: pruning operates on individual tool output messages (cheap, no LLM call), while compaction summarises entire conversation segments (expensive, LLM call).
Ported from OpenCode V1: packages/opencode/src/session/compaction.ts prune().
Structs§
- Prune
Result - Result of a pruning pass.
Constants§
- PRUNED_
PLACEHOLDER - Placeholder text replacing pruned tool outputs.
Functions§
- prune_
tool_ outputs - Marks old tool output messages for pruning.