opencode-dynamic-context-pruning
Intelligent Context Pruning for OpenCode
Automatically reduces token usage in OpenCode by intelligently removing redundant tool calls from conversation history. Features zero-cost automatic strategies, LLM-driven pruning tools, and real-time statistics.
Reduce token costs and improve AI response quality through intelligent context management.
Deduplication, write superseding, and error purging strategies run automatically with zero LLM cost.
AI autonomously invokes discard and extract tools to intelligently clean up completed task content.
View token usage distribution and pruning effects through /dcp context and /dcp stats commands.
Use /dcp sweep command to manually clean up specified number of tool calls when needed.
Global, environment variable, and project-level configuration to flexibly adapt to different needs.
Turn protection, protected tools, and file patterns ensure critical content is never accidentally pruned.
Configure turn protection, protected tools, and file patterns
Retain pruning history and statistics across OpenCode sessions
Balance cache hit rate with token savings for different providers
Understand why DCP automatically disables in subagent sessions