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
"You are continuing a previous agent's work in a clean context. Available knowledge:",
66
-
"- Use `ledger_get` to retrieve detailed entries by name on demand",
26
+
"You are continuing a previous agent's work in a clean context. Use the available knowledge correctly:",
27
+
"- Notebook pages hold durable grounding knowledge; fetch them with `notebook_read`",
28
+
"- This handoff brief holds the distilled next task and immediate situational context",
29
+
"- Use `notebook_index` to scan available pages when needed",
67
30
"- Use `spawn` to delegate isolated subtasks to child agents",
68
-
"- Build on ledger knowledge and the handoff brief rather than reconstructing old context",
69
-
"- Treat the handoff brief as the missing picture that survived the cut",
31
+
"- Build on notebook grounding and this brief rather than reconstructing old context",
32
+
"",
33
+
"## Task",
34
+
"",
35
+
task,
70
36
];
71
37
72
-
if(refs.length>0){
73
-
parts.push("","### Inlined Ledger Context");
74
-
for(const{ name, body }ofrefs){
75
-
parts.push("",`Ledger: \`${name}\``,body,"---");
76
-
}
77
-
}
78
-
79
-
parts.push("","## Task","",task);
80
-
81
38
returnparts.join("\n");
82
39
}
83
40
@@ -89,8 +46,8 @@ export function registerHandoffTool(
89
46
name: "handoff",
90
47
label: "Handoff",
91
48
description:
92
-
"Replace the active context with a compact handoff task at the end of "+
93
-
"the current turn while keeping full history in the session file.\n\n"+
49
+
"Replace the active context with a compact task brief at the end of "+
50
+
"the current turn while keeping full history in the session file. Handoff clears the active notebook topic so the next clean context can assign a fresh one.\n\n"+
94
51
"WHEN TO USE:\n"+
95
52
" 1. Context past ~30% and the current job is no longer cleanly "+
96
53
"represented near the front of attention.\n"+
@@ -100,14 +57,13 @@ export function registerHandoffTool(
100
57
"Rule: one context, one job. When the job changes, call handoff.\n\n"+
101
58
"AFTER HANDOFF the LLM sees:\n"+
102
59
" • System prompt + context primer\n"+
103
-
" • The handoff task — as a compaction summary at the top of context\n"+
104
-
" • All ledger entries — accessible via ledger_get / ledger_list",
60
+
" • The handoff task — the distilled next work at the top of context\n"+
61
+
" • All notebook pages — durable grounding accessible via notebook_read / notebook_index",
105
62
106
63
promptSnippet: "Pivot to a new job via deliberate handoff compaction",
107
64
promptGuidelines: [
108
-
"Call handoff when the job changes, or when context is past ~30% and noisy. "+
109
-
"Capture reusable state in the ledger if needed, then draft a concise but "+
110
-
"sufficiently detailed brief that completes the picture for the next clean context.",
65
+
"Before handoff, promote any missing durable grounding knowledge to the notebook. "+
66
+
"Then draft a concise but sufficiently detailed brief with the distilled next task and immediate starting state for the next clean context. The active notebook topic will reset after handoff, so the next context should assign a fresh topic from the brief or user direction.",
111
67
],
112
68
113
69
executionMode: "sequential",
@@ -116,14 +72,14 @@ export function registerHandoffTool(
116
72
task: Type.String({
117
73
description:
118
74
"What to do next. A concise but sufficiently detailed handoff brief. "+
119
-
"This becomes the FIRST thing the LLM sees after handoff. Complete the "+
120
-
"picture by preserving the important knowledge still missing from the ledger, "+
121
-
"then make the next work unambiguous using any structure you want.",
75
+
"This becomes the FIRST thing the LLM sees after handoff. Capture the distilled next task, "+
0 commit comments