From e116924006f1d94711386e948358c39c42058c8e Mon Sep 17 00:00:00 2001 From: Daniel Smolsky Date: Thu, 4 Dec 2025 12:19:54 -0500 Subject: [PATCH] Use primary_tools to restrict prune to main agent --- README.md | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index ee60a93..1d30d08 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,15 @@ Add to your OpenCode config: ```jsonc // opencode.jsonc { - "plugin": ["@tarquinen/opencode-dcp@0.4.1"] + "plugin": ["@tarquinen/opencode-dcp@0.4.1"], + "experimental": { + "primary_tools": ["prune"] + } } ``` +The `experimental.primary_tools` setting ensures the `prune` tool is only available to the primary agent (not subagents). + When a new version is available, DCP will show a toast notification. Update by changing the version number in your config. Restart OpenCode. The plugin will automatically start optimizing your sessions. @@ -84,20 +89,6 @@ Settings are merged in order: **Defaults** → **Global** (`~/.config/opencode/d Restart OpenCode after making config changes. -## Subagents - -DCP automatically skips processing for subagent sessions (`general`, `explore`, etc.), but subagents can still invoke the `prune` tool. To prevent this, disable the tool in your OpenCode config. Any custom agents you've defined should also have prune disabled: - -```jsonc -// opencode.jsonc -{ - "agent": { - "general": { "tools": { "prune": false } }, - "explore": { "tools": { "prune": false } } - } -} -``` - ## License MIT