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
'message: Task is still running. Wait for its terminal result.',
71
+
`next: ${tracked ? 'use task_status to inspect the task' : 'retry task_result after the task finishes'}`,
72
+
].join('\n');
73
+
}
74
+
61
75
functionassertStableTrackedGeneration(
62
76
requested: string,
63
77
parentSessionID: string,
@@ -85,13 +99,11 @@ export function createTaskResultTool(
85
99
options: TaskResultToolOptions,
86
100
): Record<string,ToolDefinition>{
87
101
consttask_result=tool({
88
-
description: `Retrieve the final text already produced by a specialist task without resuming or re-running it.
102
+
description: `Retrieve the final text already produced by a specialist task, or inspect its active state without resuming or re-running it.
89
103
90
-
Use this when the user asks to see a prior task's full result, or before retrying work whose completed output may already answer the request. Accepts either the native task_id/session ID or the parent-scoped alias shown in the Background Job Board. This tool is read-only and never sends a new prompt to the specialist.`,
104
+
Use this when the user asks to see a prior task's full result, or before retrying work whose completed output may already answer the request. If the task is still running, this returns a status message; only a completed task returns its final text. Accepts either the native task_id/session ID or the parent-scoped alias shown in the Background Job Board. This tool is read-only and never sends a new prompt to the specialist.`,
91
105
args: {
92
-
task_id: z
93
-
.string()
94
-
.describe('Completed task ID or Background Job Board alias'),
106
+
task_id: z.string().describe('Task ID or Background Job Board alias'),
95
107
},
96
108
asyncexecute(args,toolContext){
97
109
constparentSessionID=toolContext?.sessionID;
@@ -147,6 +159,19 @@ Use this when the user asks to see a prior task's full result, or before retryin
147
159
thrownewError(`Unknown task ID or alias: ${requested}`);
0 commit comments