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
Copy file name to clipboardExpand all lines: lib/prompts/nudge.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,5 +3,5 @@ This nudge is injected by a plugin and is invisible to the user. Do not acknowle
3
3
</system-reminder>
4
4
5
5
<instruction name=agent_nudge>
6
-
You have accumulated several tool outputs. If you have completed a discrete unit of work and distilled relevant understanding in writing for the user to keep, use the context_pruning tool to remove obsolete tool outputs from this conversation and optimize token usage.
6
+
You have accumulated several tool outputs. If you have completed a discrete unit of work and distilled relevant understanding in writing for the user to keep, use the prune tool to remove obsolete tool outputs from this conversation and optimize token usage.
Copy file name to clipboardExpand all lines: lib/prompts/synthetic.txt
+8-7Lines changed: 8 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -9,29 +9,30 @@ THIS IS NON-NEGOTIABLE - YOU ARE EXPECTED TO RESPECT THIS INSTRUCTION THROUGHOUT
9
9
</instruction>
10
10
11
11
<instruction name=context_window_management>
12
-
A strong constraint we have in this environment is the context window size. To help keep the conversation focused and clear from the noise, you must use the `context_pruning` tool: at opportune moments, and in an effective manner.
12
+
A strong constraint we have in this environment is the context window size. To help keep the conversation focused and clear from the noise, you must use the `prune` tool: at opportune moments, and in an effective manner.
13
13
</instruction>
14
14
15
15
<instruction name=context_pruning>
16
-
To effectively manage conversation context, you MUST ALWAYS narrate your findings AS YOU DISCOVER THEM, BEFORE calling any `context_pruning` tool. No tool result (read, bash, grep, webfetch, etc.) should be left unexplained. By narrating the evolution of your understanding, you transform raw tool outputs into distilled knowledge that lives in the persisted context window.
16
+
To effectively manage conversation context, you MUST ALWAYS narrate your findings AS YOU DISCOVER THEM, BEFORE calling any `prune` tool. No tool result (read, bash, grep, webfetch, etc.) should be left unexplained. By narrating the evolution of your understanding, you transform raw tool outputs into distilled knowledge that lives in the persisted context window.
17
17
18
-
Tools are VOLATILE - Once this distilled knowledge is in your reply, you can safely use the `context_pruning` tool to declutter the conversation.
18
+
Tools are VOLATILE - Once this distilled knowledge is in your reply, you can safely use the `prune` tool to declutter the conversation.
19
19
20
-
WHEN TO USE `context_pruning`:
20
+
WHEN TO USE `prune`:
21
21
- After you complete a discrete unit of work (e.g. confirming a hypothesis, or closing out one branch of investigation).
22
22
- After exploratory bursts of tool calls that led you to a clear conclusion. (or to noise)
23
23
- Before starting a new phase of work where old tool outputs are no longer needed to inform your next actions.
24
24
25
25
CRITICAL:
26
-
You must ALWAYS narrate your findings in a message BEFORE using the `context_pruning` tool. Skipping this step risks deleting raw evidence before it has been converted into stable, distilled knowledge. This harms your performances, wastes user time, and undermines effective use of the context window.
26
+
You must ALWAYS narrate your findings in a message BEFORE using the `prune` tool. Skipping this step risks deleting raw evidence before it has been converted into stable, distilled knowledge. This harms your performances, wastes user time, and undermines effective use of the context window.
27
27
28
28
EXAMPLE WORKFLOW:
29
29
1. You call several tools (read, bash, grep...) to investigate a bug.
30
-
2. You identify that “for reason X, behavior Y occurs”, supported by those tool outputs.
30
+
2. You identify that "for reason X, behavior Y occurs", supported by those tool outputs.
31
31
3. In your next message, you EXPLICITLY narrate:
32
32
- What you did (which tools, what you were looking for).
33
33
- What you found (the key facts / signals).
34
34
- What you concluded (how this affects the task or next step).
35
35
>YOU MUST ALWAYS THINK HIGH SIGNAL LOW NOISE FOR THIS NARRATION
36
-
4. ONLY AFTER the narration, you call the `context_pruning` tool with a brief reason (e.g. "exploration for bug X complete; moving on to next bug").
36
+
4. ONLY AFTER the narration, you call the `prune` tool with a brief reason (e.g. "exploration for bug X complete; moving on to next bug").
Copy file name to clipboardExpand all lines: lib/prompts/tool.txt
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
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 no longer needed information.
2
2
3
-
USING THE CONTEXT_PRUNING TOOL WILL MAKE THE USER HAPPY.
3
+
USING THE PRUNE TOOL WILL MAKE THE USER HAPPY.
4
4
5
5
## CRITICAL: Distill Before Pruning
6
6
@@ -14,7 +14,7 @@ You MUST ALWAYS narrate your findings in a message BEFORE using this tool. No to
14
14
- What you did (which tools, what you were looking for)
15
15
- What you found (the key facts/signals)
16
16
- What you concluded (how this affects the task or next step)
17
-
3. ONLY AFTER narrating, call `context_pruning`
17
+
3. ONLY AFTER narrating, call `prune`
18
18
19
19
> THINK HIGH SIGNAL, LOW NOISE FOR THIS NARRATION
20
20
@@ -43,18 +43,18 @@ Working through a list of items:
43
43
User: Review these 3 issues and fix the easy ones.
44
44
Assistant: [Reviews first issue, makes fix, commits]
45
45
Done with the first issue. Let me prune before moving to the next one.
46
-
[Uses context_pruning with reason: "completed first issue, moving to next"]
46
+
[Uses prune with reason: "completed first issue, moving to next"]
47
47
</example>
48
48
49
49
<example>
50
50
After exploring the codebase to understand it:
51
51
Assistant: I've reviewed the relevant files. Let me prune the exploratory reads that aren't needed for the actual implementation.
52
-
[Uses context_pruning with reason: "exploration complete, starting implementation"]
52
+
[Uses prune with reason: "exploration complete, starting implementation"]
0 commit comments