Skip to content

sessions_spawn fails with "gateway closed (1008): pairing required" for internal subagents #12210

Description

@jaydoughty

When attempting to spawn a subagent using sessions_spawn, the tool immediately errors with:
{
"status": "error",
"error": "gateway closed (1008): pairing required\nGateway target: ws://172.18.0.2:18789\nSource: local lan 172.18.0.2\nConfig: /home/node/.openclaw/openclaw.json\nBind: lan",
"childSessionKey": "agent:outbound-architect:subagent:",
"runId": ""
}
Expected behavior:
Internal subagents should auto-authenticate and spawn successfully without requiring device pairing.
Actual behavior:
Gateway treats internal subagent connections as external devices requiring pairing approval, blocking subagent execution.
Environment:

OpenClaw version: v2026.2.6 (latest)
Node.js: v22.22.0
OS: Linux (Docker container)
Runtime: Docker on VPN-connected host
Configuration:

"agents": {
"defaults": {
"subagents": {
"maxConcurrent": 8
}
},
"list": [
{
"id": "main",
"subagents": {
"allowAgents": ["*"]
}
}
]
}
Reproduction:

Configure main agent with allowAgents: ["*"]
Call sessions_spawn with agentId: "outbound-architect"
Error occurs immediately
Workaround:

None found. Falling back to single-agent execution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions