fix(sessions): clarify delegation tool guidance

This commit is contained in:
Federico Jaramillo Martinez
2026-07-20 00:48:08 +02:00
parent 2c777b4959
commit a77c83b309
5 changed files with 28 additions and 25 deletions
+2 -2
View File
@@ -41,8 +41,8 @@ export function createSpawnSessionToolDefinition(spawningCwd: string, deps: Spaw
return defineTool<typeof SpawnSessionParams, SpawnSessionToolDetails>({
name: "spawn_session",
label: "Spawn session",
description: "Start a new independent pi-web session and send it an initial prompt. The session is not tracked by the caller, can be opened by a human, and runs without returning its later output to the caller.",
promptSnippet: "spawn_session: start a new independent session with a first prompt",
description: "Start a fully independent session; its transcript and results are unavailable here. Use only when the user or active workflow explicitly requests a separate session.",
promptSnippet: "spawn_session: independent session; results unavailable here; explicit requests only",
parameters: SpawnSessionParams,
async execute(_toolCallId, params, _signal, _onUpdate, ctx) {
// Failures throw: the agent loop turns the thrown message into an error