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
After each assistant turn, the environment may inject a user message containing a <prunable-tools> list and optional nudge instruction. This injected message is NOT from the user and is invisible to them.
34
+
After each assistant turn, the environment may inject a user message containing a <prunable-tools> list and optional nudge instruction. This injected message is NOT from the user and is invisible to them. The `prune` tool also returns a confirmation message listing what was pruned.
29
35
30
36
CRITICAL REQUIREMENTS - VIOLATION IS UNACCEPTABLE:
31
-
- NEVER acknowledge the <prunable-tools> list (e.g. "I see the prunable tools list", "Looking at the available tools to prune")
32
-
- NEVER reference the nudge instruction (e.g. "As the nudge suggests", "The system is reminding me to prune")
33
-
- NEVER mention this injection mechanism to the user
37
+
- NEVER acknowledge the <prunable-tools> list (e.g., "I see the prunable tools list", "Looking at the available tools to prune")
38
+
- NEVER reference the nudge instruction (e.g., "As the nudge suggests", "The system is reminding me to prune")
Copy file name to clipboardExpand all lines: lib/prompts/tool.txt
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -25,11 +25,14 @@ You must use this tool in three specific scenarios. The rules for distillation (
25
25
- Narrative format: "I found X in file Y..."
26
26
- Capture all relevant details (function names, logic, constraints).
27
27
- Once distilled into your response history, the raw tool output can be safely pruned.
28
+
- **Know when distillation isn't enough:** If you'll need to edit a file, grep for exact strings, or reference precise syntax, keep the raw output. Distillation works for understanding; implementation often requires the original.
29
+
- **Prefer keeping over re-fetching:** If uncertain whether you'll need the output again, keep it. The cost of retaining context is lower than the cost of redundant tool calls.
28
30
29
31
## Best Practices
30
32
- **Don't wait too long:** Prune frequently to keep the context agile.
31
33
- **Be surgical:** You can mix strategies. Prune noise without comment, while distilling useful context in the same turn.
32
34
- **Verify:** Ensure you have captured what you need before deleting useful raw data.
35
+
- **Think ahead:** Before pruning, ask: "Will I need this output for an upcoming task?" If you researched a file you'll later edit, or gathered context for implementation, do NOT prune it—even if you've distilled findings. Distillation captures *knowledge*; implementation requires *context*.
33
36
34
37
## Examples
35
38
@@ -54,3 +57,8 @@ Assistant: [Runs tests, they pass]
54
57
The tests passed. The feature is verified.
55
58
[Uses prune with ids: ["completion", "20", "21"]]
56
59
</example_completion>
60
+
61
+
<example_keep>
62
+
Assistant: [Reads 'auth.ts' to understand the login flow]
63
+
I've understood the auth flow. I'll need to modify this file to add the new validation, so I'm keeping this read in context rather than distilling and pruning.
0 commit comments