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
Add prune cooldown to prevent immediate re-pruning
When the last tool used was prune, inject a cooldown message instead
of the full prunable-tools list. This prevents the model from
repeatedly invoking the prune tool in successive turns.
Also refactors magic strings into named constants for better
maintainability.
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>`
0 commit comments