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
The following tools have been invoked and are available for pruning. This list does not mandate immediate action. Consider your current goals and the resources you need before discarding valuable tool inputs or outputs. Keep the context free of noise.
15
+
${content}
16
+
</prunable-tools>`
17
+
constPRUNABLE_TOOLS_COOLDOWN=`<prunable-tools>
18
+
Pruning was just performed. Do not use the prune tool again. A fresh list will be available after your next tool use.
return`<prunable-tools>\nThe following tools have been invoked and are available for pruning. This list does not mandate immediate action. Consider your current goals and the resources you need before discarding valuable tool inputs or outputs. Keep the context free of noise.\n${lines.join('\n')}\n</prunable-tools>`
Copy file name to clipboardExpand all lines: lib/prompts/synthetic.txt
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ Pruning that forces you to re-call the same tool later is a net loss. Only prune
28
28
NOTES
29
29
When in doubt, keep it. Prune often yet remain strategic about it.
30
30
FAILURE TO PRUNE will result in context leakage and DEGRADED PERFORMANCES.
31
+
There may be tools in session context that do not appear in the <prunable-tools> list, this is expected, you can ONLY prune what you see in <prunable-tools>.
Copy file name to clipboardExpand all lines: lib/prompts/tool.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
Prunes tool outputs from context to manage conversation size and reduce noise. For `write` and `edit` tools, the input content is pruned instead of the output.
2
2
3
3
## IMPORTANT: The Prunable List
4
-
A `<prunable-tools>` list is injected into user messages showing available tool outputs you can prune. Each line has the format `ID: tool, parameter` (e.g., `20: read, /path/to/file.ts`). You MUST only use numeric IDs that appear in this list to select which tools to prune.
4
+
A `<prunable-tools>` list is injected into user messages showing available tool outputs you can prune when there are tools available for pruning. Each line has the format `ID: tool, parameter` (e.g., `20: read, /path/to/file.ts`). You MUST only use numeric IDs that appear in this list to select which tools to prune.
5
5
6
6
**Note:** For `write` and `edit` tools, pruning removes the input content (the code being written/edited) while preserving the output confirmation. This is useful after completing a file modification when you no longer need the raw content in context.
0 commit comments