feat: allow sessions_spawn cross-agent

This commit is contained in:
Peter Steinberger
2026-01-08 06:55:28 +00:00
parent d1ceb3aa60
commit 0ba72477de
13 changed files with 184 additions and 20 deletions

View File

@@ -126,10 +126,14 @@ Spawn a sub-agent run in an isolated session and announce the result back to the
Parameters:
- `task` (required)
- `label?` (optional; used for logs/UI)
- `agentId?` (optional; spawn under another agent id if allowed)
- `model?` (optional; overrides the sub-agent model; invalid values error)
- `runTimeoutSeconds?` (default 0; when set, aborts the sub-agent run after N seconds)
- `cleanup?` (`delete|keep`, default `keep`)
Allowlist:
- `routing.agents.<agentId>.subagents.allowAgents`: list of agent ids allowed via `agentId` (`["*"]` to allow any). Default: only the requester agent.
Behavior:
- Starts a new `agent:<agentId>:subagent:<uuid>` session with `deliver: false`.
- Sub-agents default to the full tool set **minus session tools** (configurable via `agent.subagents.tools`).