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
feat(delegation): add per-task toolsets, persona, and timeout fields
Three new per-task fields on delegate_task batch items:
- **toolsets** (string[]): restrict which tools a subagent loads.
Previously hardcoded to None (inherit parent), now the model can
narrow toolsets per task. Intersection with parent toolsets and
blocked-tool stripping are handled by the existing validation chain.
- **persona** (string): injected into the child's system prompt as a
YOUR ROLE block to specialize behavior (e.g. 'web researcher',
'senior engineer') without cramming instructions into context.
- **timeout** (number): per-task wall-clock cap in seconds. Overrides
the global delegation.child_timeout_seconds for that subagent.
None = inherit the global default (no timeout by default).
All three are backward-compatible: single-task mode is unchanged,
and batch tasks without the new fields default to None with
existing inheritance behaviour preserved.
"- Subagent model is NOT selectable per call: children inherit the parent model (plus its fallback chain) unless you pin all subagents to a model via delegation.provider / delegation.model in config.yaml.\n"
3326
3350
"- Each subagent gets its own terminal session (separate working directory and state).\n"
3351
+
"- Per-task fields on batch items: 'toolsets' (restrict which tools the subagent loads), 'persona' (specialize its behavior via a role description), 'timeout' (per-task wall-clock cap in seconds).\n"
3327
3352
"- Results are always returned as an array, one entry per task."
"description": "Per-task role override. See top-level 'role' for semantics.",
3453
3481
},
3482
+
"toolsets": {
3483
+
"type": "array",
3484
+
"items": {"type": "string"},
3485
+
"description": "Optional toolset names to restrict this subagent to (e.g. [\"web\", \"terminal\", \"file\"]). When set, only tools from these toolsets are loaded, significantly reducing input token overhead. When omitted, the subagent inherits the parent's full toolset. Infer from the task — e.g. use [\"web\"] for research, [\"terminal\", \"file\"] for coding, [\"web\", \"terminal\", \"file\", \"delegation\"] for orchestrator tasks.",
3486
+
},
3487
+
"persona": {
3488
+
"type": "string",
3489
+
"description": "Optional role/persona description injected into the subagent's system prompt (e.g. 'web researcher — focus on finding authoritative sources, cite URLs', 'senior engineer — prioritize correctness, add error handling'). Helps specialize subagent behavior without cramming instructions into context.",
3490
+
},
3491
+
"timeout": {
3492
+
"type": "number",
3493
+
"description": "Optional per-task wall-clock timeout in seconds. Overrides the global delegation.child_timeout_seconds for this subagent. Use a short timeout for quick lookups (e.g. 30) and a longer one for deep analysis (e.g. 300). Omit to inherit the global default (no timeout by default).",
0 commit comments