Skip to content

Commit 1d2809e

Browse files
clean up
1 parent fac6ee5 commit 1d2809e

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,10 @@ Add to your OpenCode config:
1313
```jsonc
1414
// opencode.jsonc
1515
{
16-
"plugin": ["@tarquinen/opencode-dcp@latest"],
17-
"experimental": {
18-
"primary_tools": ["prune"]
19-
}
16+
"plugin": ["@tarquinen/opencode-dcp@latest"]
2017
}
2118
```
2219

23-
The `experimental.primary_tools` setting ensures the `prune` tool is only available to the primary agent (not subagents).
24-
2520
Using `@latest` ensures you always get the newest version automatically when OpenCode starts.
2621

2722
Restart OpenCode. The plugin will automatically start optimizing your sessions.

lib/pruning-tool.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { PluginConfig } from "./config"
44
import type { ToolTracker } from "./fetch-wrapper/tool-tracker"
55
import type { ToolMetadata, PruneReason } from "./fetch-wrapper/types"
66
import { resetToolTrackerCount } from "./fetch-wrapper/tool-tracker"
7-
import { isSubagentSession, findCurrentAgent } from "./hooks"
7+
import { findCurrentAgent } from "./hooks"
88
import { getActualId } from "./state/id-mapping"
99
import { sendUnifiedNotification, type NotificationContext } from "./ui/notification"
1010
import { formatPruningResultForTool } from "./ui/display-utils"
@@ -51,10 +51,6 @@ export function createPruningTool(
5151
const { client, state, logger, config, notificationCtx } = ctx
5252
const sessionId = toolCtx.sessionID
5353

54-
if (await isSubagentSession(client, sessionId)) {
55-
return "Pruning is unavailable in subagent sessions. Do not call this tool again. Continue with your current task - if you were in the middle of work, proceed with your next step. If you had just finished, provide your final summary/findings to return to the main agent."
56-
}
57-
5854
if (!args.ids || args.ids.length === 0) {
5955
return "No IDs provided. Check the <prunable-tools> list for available IDs to prune."
6056
}

0 commit comments

Comments
 (0)