Skip to content

Commit d456306

Browse files
committed
fix: improve subagent prune skip message to handle mid-workflow scenarios
1 parent 06e0030 commit d456306

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/pruning-tool.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ export function createPruningTool(client: any, janitor: Janitor, config: PluginC
2222
),
2323
},
2424
async execute(args, ctx) {
25-
// Skip pruning in subagent sessions, but guide the model to provide a proper summary
26-
// TODO: implement something better here when PR 4913 is merged
25+
// Skip pruning in subagent sessions, but guide the model to continue its work
26+
// TODO: remove this workaround when PR 4913 is merged (primary_tools config)
2727
if (await isSubagentSession(client, ctx.sessionID)) {
28-
return "Pruning is disabled in subagent sessions. IMPORTANT: You must now provide your final summary/findings to return to the main agent. Do not call this tool again - simply respond with your results."
28+
return "Pruning is unavailable in subagent sessions. 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."
2929
}
3030

3131
const result = await janitor.runForTool(

0 commit comments

Comments
 (0)