#I can not spawn subagents

1 messages · Page 1 of 1 (latest)

summer prairie
#

openclaw --version
OpenClaw 2026.4.15 (041266a)
My main agent try launch subagents and see forbidden: agentId is not allowed for sessions_spawn (allowed: none).

blissful phoenixBOT
bronze crowBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

blissful phoenixBOT
little pagodaBOT
#

Exec approval is required, but native chat exec approvals are not configured on Discord.

Approve it from the Web UI or terminal UI for now. Discord supports native exec approvals for this account. Configure channels.discord.execApprovals.approvers or commands.ownerAllowFrom; leave channels.discord.execApprovals.enabled unset/auto or set it to true.

little pagodaBOT
# summer prairie openclaw --version OpenClaw 2026.4.15 (041266a) My main agent try launch subagen...

That error usually means one of these:

  1. You’re targeting another agent with agentId, but that target is not allowed
  2. The session is stale and still has the old permission snapshot

For sessions_spawn, the config that matters is subagent allowlist, not tools.agentToAgent.allow.

Use one of these in openclaw.json:

{
  agents: {
    defaults: {
      subagents: {
        allowAgents: ["*"], // or ["worker", "researcher"]
      },
#
    },
    list: [
      {
        id: "main",
        subagents: {
          allowAgents: ["worker", "researcher"],
        },
      },
    ],
  },
}

A couple important gotchas:

  • If you only want a background worker under the same agent, omit agentId entirely.