diff --git a/docs/concepts/session-tool.md b/docs/concepts/session-tool.md index ac74ff9fb65..a8a3b77ecf4 100644 --- a/docs/concepts/session-tool.md +++ b/docs/concepts/session-tool.md @@ -22,6 +22,27 @@ orchestrate sub-agents. | `subagents` | List, steer, or kill spawned sub-agents for this session | | `session_status` | Show a `/status`-style card and optionally set a per-session model override | +These tools are still subject to the active tool profile and allow/deny +policy. `tools.profile: "coding"` includes the full session orchestration +set, including `sessions_spawn`, `sessions_yield`, and `subagents`. +`tools.profile: "messaging"` includes cross-session messaging tools +(`sessions_list`, `sessions_history`, `sessions_send`, `session_status`) but +does not include sub-agent spawning. To keep a messaging profile and still +allow native delegation, add: + +```json5 +{ + tools: { + profile: "messaging", + alsoAllow: ["sessions_spawn", "sessions_yield", "subagents"], + }, +} +``` + +Group, provider, sandbox, and per-agent policies can still remove those tools +after the profile stage. Use `/tools` from the affected session to inspect the +effective tool list. + ## Listing and reading sessions `sessions_list` returns sessions with their key, agentId, kind, channel, model, diff --git a/docs/tools/subagents.md b/docs/tools/subagents.md index 72819b503d9..f694e657715 100644 --- a/docs/tools/subagents.md +++ b/docs/tools/subagents.md @@ -120,6 +120,14 @@ Starts a sub-agent run with `deliver: false` on the global `subagent` lane, then runs an announce step and posts the announce reply to the requester chat channel. +Availability depends on the caller's effective tool policy. The `coding` and +`full` profiles expose `sessions_spawn` by default. The `messaging` profile +does not; add `tools.alsoAllow: ["sessions_spawn", "sessions_yield", +"subagents"]` or use `tools.profile: "coding"` for agents that should delegate +work. Channel/group, provider, sandbox, and per-agent allow/deny policies can +still remove the tool after the profile stage. Use `/tools` from the same +session to confirm the effective tool list. + **Defaults:** - **Model:** inherits the caller unless you set `agents.defaults.subagents.model` (or per-agent `agents.list[].subagents.model`); an explicit `sessions_spawn.model` still wins.