Skip to content

Releases: Opencode-DCP/opencode-dynamic-context-pruning

v1.1.2 - Simplified notification system

26 Dec 05:47
a5731e6

Choose a tag to compare

What's Changed

  • Refactor: Consolidate distillation into unified notification - cleaner output format
  • Refactor: Remove assistant message injection support - simplifies codebase
  • UI: Simplify distillation notification format with plain dividers

Full Changelog: v1.1.1...v1.1.2

v1.1.1 - Purge errors strategy & skill tool support

25 Dec 22:17
07f572b

Choose a tag to compare

What's Changed

Features

  • Purge errors strategy: Automatically prune tool inputs after failed calls to reduce context pollution
  • Skill tool support: Added skill tool support to extractParameterKey for better tool handling

Improvements

  • Improved error pruning replacement text for clearer context
  • README updates for context poisoning mitigation and OAuth tips

Full Changelog: v1.1.0...v1.1.1

v1.1.0 - Role-based prompt injection and read tool improvements

25 Dec 04:16
4cb7f98

Choose a tag to compare

What's Changed

  • Discard/Extract tools: Split prune into separate tools - discard removes outputs, extract captures distilled findings as tool parameters (eliminating inline summaries)
  • Turn protection: Add turn-based tool protection and prune cooldown
  • Config restructure: Restructure config schema to consolidate tool settings
  • Edit tool fix: Correctly prune edit tool inputs (oldString/newString instead of content)
  • Read tool improvements: Add line range info to read tool display for better context visibility
  • Role-based prompt injection: Use user role injection for reasoning models, assistant role for non-reasoning models
  • Debug logging: Add debug context logging for session messages

Full Changelog: v1.0.3...v1.1.0

v1.1.1-beta.1 - Split prune into discard/extract tools

23 Dec 20:59
896a669

Choose a tag to compare

What's Changed

  • Split prune tool into discard and extract tools for more granular context management
  • Refactored to use assistant role for prunable-tools injection with reasoning model support
  • Restructured config schema to consolidate tool settings
  • Added debug context logging for session messages
  • Fixed edit tool pruning to correctly handle oldString/newString
  • Added prettier for consistent code formatting
  • Added turn-based tool protection and prune cooldown features

Full Changelog: v1.0.3...v1.1.1-beta.1

v1.0.4 - Fix pruning of pending/running tool inputs

18 Dec 22:33
b39ef03

Choose a tag to compare

What's Changed

  • Fix: Don't prune pending or running tool inputs, preventing premature context removal

Full Changelog: v1.0.3...v1.0.4

v1.0.3 - Supersede writes strategy and session init improvements

18 Dec 05:55

Choose a tag to compare

What's Changed

  • Add supersede writes strategy: New pruning strategy that automatically prunes write tool inputs when the same file is subsequently read, reducing context overhead since the current file state is already captured in the read result
  • Improve session initialization: Check compaction timestamp on session init for improved state handling

Full Changelog: v1.0.2...v1.0.3

v1.0.2 - Message-based compaction detection

17 Dec 08:59

Choose a tag to compare

What's Changed

  • Message-based compaction detection: Detect compaction from message data instead of relying on events, improving reliability
  • Tool cache optimization: Clear tool caches on compaction and add stale entry warning to prevent stale data issues
  • Performance improvement: Optimize findLastCompactionTimestamp to iterate from end for better performance
  • Backwards compatibility: Restore showUpdateToasts config option for backwards compatibility

Full Changelog: v1.0.1...v1.0.2

v1.0.1 - Bug fixes and improvements

16 Dec 22:37

Choose a tag to compare

What's Changed

  • Fix critical compaction bug - Resolved a nasty bug where pruning operations failed after context compaction
  • Add write/edit input pruning - Enabled capability to prune inputs for write and edit tools
  • Refactor utils structure - Cleaned up utility file organization for better maintainability
  • Improve pruning prompts - Enhanced guidance to prevent premature context loss
  • Fix model stability - Resolved issue where model selection changed unexpectedly when prune was invoked
  • Add prune tool debug logs
  • Simplify pruning notification label

Full Changelog: v1.0.0...v1.0.1

v1.0.0 - Major Architecture Rewrite

15 Dec 19:05

Choose a tag to compare

What's Changed

Highlights

Complete rewrite to use OpenCode's native hooks API, removing ~1,400 lines of provider-specific fetch wrapper code. The plugin now uses experimental.chat.messages.transform and experimental.chat.system.transform hooks, making it dramatically simpler and more maintainable.

Architecture

  • Removed lib/fetch-wrapper/ directory with 6+ format adapters (Anthropic, Bedrock, Gemini, OpenAI)
  • Simplified state management, removed ID mapping layer
  • Consolidated tool cache logic
  • Net reduction of ~1,400 lines

New Features

  • System prompt transformation hook for synthetic context injection
  • AI nudge system reminds LLM to use prune tool after N tool results
  • Support for $OPENCODE_CONFIG_DIR config location
  • Prune tool enabled by default

Bug Fixes

  • Skip inserting prunable tools list when empty
  • Properly reset nudge counter after prune tool use
  • Await session state load before syncing tool cache
  • Prevent compacted tools from appearing in prunable list

Breaking Changes

  • On-idle strategy now marked as legacy and disabled by default

Full Changelog: v0.4.17...v1.0.0

v1.0.0-beta.2 - Fix nudge counter reset

15 Dec 01:02

Choose a tag to compare

Pre-release

What's Changed

  • Fix nudge counter to properly reset after prune tool is used
  • Increase MAX_TOOL_CACHE_SIZE from 500 to 1000 for better session handling
  • Refactor sync logic to correctly track nudge counter across session restarts

Full Changelog: v1.0.0-beta.1...v1.0.0-beta.2