You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Performs semantic pruning on session tool outputs that are no longer "+
221
-
"relevant to the current task. Use this to declutter the conversation context and "+
222
-
"filter signal from noise when you notice the context is getting cluttered with "+
223
-
"outdated information (e.g., after completing a debugging session, switching to a "+
224
-
"new task, or when old file reads are no longer needed).",
220
+
description: `Performs semantic pruning on session tool outputs that are no longer relevant to the current task. Use this to declutter the conversation context and filter signal from noise when you notice the context is getting cluttered with outdated information.
221
+
222
+
## When to Use This Tool
223
+
224
+
- After completing a debugging session or fixing a bug
225
+
- When switching focus to a new task or feature
226
+
- After exploring multiple files that didn't lead to changes
227
+
- When you've been iterating on a difficult problem and some approaches didn't pan out
228
+
- When old file reads, greps, or bash outputs are no longer relevant
229
+
230
+
## Examples
231
+
232
+
<example>
233
+
Working through a list of bugs to fix:
234
+
User: Please fix these 5 type errors in the codebase.
235
+
Assistant: I'll work through each error. [Fixes first error]
236
+
First error fixed. Let me prune the debugging context before moving to the next one.
237
+
[Uses context_pruning with reason: "first bug fixed, moving to next task"]
238
+
</example>
239
+
240
+
<example>
241
+
After exploring the codebase to understand it:
242
+
Assistant: I've reviewed the relevant files. Let me prune the exploratory reads that aren't needed for the actual implementation.
243
+
[Uses context_pruning with reason: "exploration complete, pruning unrelated file reads"]
244
+
</example>
245
+
246
+
<example>
247
+
After trying multiple approaches that didn't work:
248
+
Assistant: I've been trying several approaches to fix this issue. Let me prune the failed attempts to keep focus on the working solution.
249
+
[Uses context_pruning with reason: "pruning failed iteration attempts, keeping working solution context"]
250
+
</example>`,
225
251
args: {
226
252
reason: tool.schema.string().optional().describe(
227
253
"Brief reason for triggering pruning (e.g., 'task complete', 'switching focus')"
0 commit comments