feat: add sessions_spawn sub-agent tool

This commit is contained in:
Peter Steinberger
2026-01-06 08:41:45 +01:00
parent 952657d55c
commit a279bcfeb1
14 changed files with 842 additions and 86 deletions

View File

@@ -806,6 +806,16 @@ export type ClawdbotConfig = {
};
/** Max concurrent agent runs across all conversations. Default: 1 (sequential). */
maxConcurrent?: number;
/** Sub-agent defaults (spawned via sessions_spawn). */
subagents?: {
/** Max concurrent sub-agent runs (global lane: "subagent"). Default: 1. */
maxConcurrent?: number;
/** Tool allow/deny policy for sub-agent sessions (deny wins). */
tools?: {
allow?: string[];
deny?: string[];
};
};
/** Bash tool defaults. */
bash?: {
/** Default time (ms) before a bash command auto-backgrounds. */

View File

@@ -465,6 +465,17 @@ export const ClawdbotSchema = z.object({
typingIntervalSeconds: z.number().int().positive().optional(),
heartbeat: HeartbeatSchema,
maxConcurrent: z.number().int().positive().optional(),
subagents: z
.object({
maxConcurrent: z.number().int().positive().optional(),
tools: z
.object({
allow: z.array(z.string()).optional(),
deny: z.array(z.string()).optional(),
})
.optional(),
})
.optional(),
bash: z
.object({
backgroundMs: z.number().int().positive().optional(),