Skip to content

Advanced Features

This chapter dives deep into DCP's advanced features, helping you understand the plugin's internal mechanisms and use DCP correctly in complex scenarios.

Prerequisites

Before studying this chapter, ensure you have completed:

Chapter Contents

CourseDescriptionSuitable For
Protection MechanismsTurn protection, protected tools, and protected file patternsAvoid mistakenly pruning critical content
State PersistenceHow DCP preserves pruning state and statistics across sessionsUnderstand data storage mechanisms
Prompt Caching ImpactImpact of DCP pruning on Prompt CachingOptimize cache hit rates
Subagent HandlingDCP behavior and limitations in subagent sessionsWhen using Task tools
Protection Mechanisms → State Persistence → Prompt Caching Impact → Subagent Handling
          ↓                   ↓                     ↓                      ↓
       Required        Learn as Needed    Learn for Optimization    Learn when Using Subagents

Recommended Order:

  1. Protection Mechanisms (Required) - The most important advanced feature, understanding it prevents DCP from mistakenly deleting critical content
  2. State Persistence (As Needed) - If you want to understand how DCP records statistics or need to debug state issues
  3. Prompt Caching Impact (For Optimization) - When you focus on API cost optimization, need to weigh the relationship between pruning and caching
  4. Subagent Handling (When Using Subagents) - If you use OpenCode's Task tool to dispatch subtasks, need to understand DCP's limitations

Next Steps

After completing this chapter, you can: