fix(subagents): return completion message for manual session spawns

This commit is contained in:
Peter Steinberger
2026-02-18 02:52:23 +01:00
parent f6f5cda6ca
commit fa4f66255c
9 changed files with 138 additions and 4 deletions

View File

@@ -1,8 +1,8 @@
import { Type } from "@sinclair/typebox";
import type { GatewayMessageChannel } from "../../utils/message-channel.js";
import type { AnyAgentTool } from "./common.js";
import { optionalStringEnum } from "../schema/typebox.js";
import { spawnSubagentDirect } from "../subagent-spawn.js";
import type { AnyAgentTool } from "./common.js";
import { jsonResult, readStringParam } from "./common.js";
const SessionsSpawnToolSchema = Type.Object({
@@ -66,6 +66,7 @@ export function createSessionsSpawnTool(opts?: {
thinking: thinkingOverrideRaw,
runTimeoutSeconds,
cleanup,
expectsCompletionMessage: true,
},
{
agentSessionKey: opts?.agentSessionKey,