openclaw - 💡(How to fix) Fix [Bug]: Subagent spawning still broken on v2026.4.15 — pairing required regression after PR #59555 [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#70195Fetched 2026-04-23 07:28:00
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1cross-referenced ×1

Error Message

[gateway] security audit: device access upgrade requested reason=scope-upgrade device=<REDACTED> ip=unknown-ip auth=token roleFrom=operator roleTo=operator scopesFrom=operator.read scopesTo=operator.admin client=gateway-client conn=<REDACTED> gateway connect failed: GatewayClientRequestError: pairing required [ws] closed before connect ... code=1008 reason=pairing required

Fix Action

Workaround

None reliable. All work must be done inline in the main session, which defeats the purpose of subagents entirely.

Code Example

gateway closed (1008): pairing required
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: ~/.openclaw/openclaw.json
Bind: loopback

---

[gateway] security audit: device access upgrade requested reason=scope-upgrade 
device=<REDACTED> ip=unknown-ip auth=token roleFrom=operator roleTo=operator 
scopesFrom=operator.read scopesTo=operator.admin client=gateway-client conn=<REDACTED>
gateway connect failed: GatewayClientRequestError: pairing required
[ws] closed before connect ... code=1008 reason=pairing required
RAW_BUFFERClick to expand / collapse

Bug Description (researched and written by OpenClaw agent)

Subagent spawning via sessions_spawn fails with WebSocket 1008 "pairing required" error, even though PR #59555 in v2026.4.2 claimed to fix this exact issue. This is a confirmed regression — subagents were working before the v2026.3.x update cycle and remain completely broken on the latest version (v2026.4.15).

The fix in PR #59555 stated:

"pin admin-only subagent gateway calls to operator.admin while keeping agent at least privilege, so sessions_spawn no longer dies on loopback scope-upgrade pairing with close(1008) 'pairing required'"

This did NOT work. The error persists identically.

Steps to Reproduce

  1. Run OpenClaw v2026.4.15 (or any version >= 2026.3.28) with local gateway
  2. From main agent session, call sessions_spawn with runtime="subagent" and any task
  3. Observe immediate failure:
gateway closed (1008): pairing required
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: ~/.openclaw/openclaw.json
Bind: loopback
  1. Gateway logs show:
[gateway] security audit: device access upgrade requested reason=scope-upgrade 
device=<REDACTED> ip=unknown-ip auth=token roleFrom=operator roleTo=operator 
scopesFrom=operator.read scopesTo=operator.admin client=gateway-client conn=<REDACTED>
gateway connect failed: GatewayClientRequestError: pairing required
[ws] closed before connect ... code=1008 reason=pairing required

Environment

  • OpenClaw version: 2026.4.15 (041266a) — latest release
  • OS: Linux (WSL2) 6.6.87.2-microsoft-standard-WSL2
  • Gateway bind: loopback
  • Auth mode: not explicitly set (token-based by default)
  • Install method: npm global

Related Issues

This appears to be a continuation/regression of multiple previously-reported bugs:

IssueTitleVersionStatus
#58085agentId not allowed for sessions_spawnv2026.3.28Open
#59428"pairing required" (1008) on v2026.4.1v2026.4.1Open
#67799scope-upgrade to operator.admin failsv2026.4.14Open (6 days ago)
#67400Can't create persistent sub-agent sessionsv2026.4.14Open (1 week ago)
#5813agentToAgent.enabled: true breaks spawnFeb 2026Open
#30242Thread-bound spawns fail "no_active_run" on DiscordMar 2026Open

Impact

Critical. Subagent spawning is the core feature of an Agentic AI platform. Without it:

  • No multi-agent orchestration possible
  • All tasks must run inline in main session (memory pressure, blocking)
  • Long-running/background tasks are impossible
  • The entire value proposition of OpenClaw as an agentic framework is broken

Frequency

100% reproducible on every spawn attempt. Affects all task types and models.

Attempted Fixes (none worked)

  • Gateway restart via openclaw gateway restart
  • Full update from v2026.3.31 → v2026.4.15
  • Multiple restart cycles after each update
  • Clearing pairing credentials
  • Changing model/provider configurations

Workaround

None reliable. All work must be done inline in the main session, which defeats the purpose of subagents entirely.

Notes

The fact that PR #59555 was merged as a fix but the error persists suggests either:

  1. The fix only addressed part of the problem (e.g., exec/node clients but not gateway-client)
  2. A subsequent update regressed the fix
  3. There are multiple code paths triggering this error and only one was patched

Given that issues #67400 and #67799 were filed just 6-7 days ago on v2026.4.14, it's clear the problem is actively being hit by users even after the "fix." This needs urgent attention — subagent spawning isn't a nice-to-have feature, it's the foundation of what OpenClaw claims to be.

extent analysis

TL;DR

The most likely fix involves re-examining the implementation of PR #59555 and ensuring that all code paths related to subagent spawning via sessions_spawn are properly addressed to prevent the WebSocket 1008 "pairing required" error.

Guidance

  • Review the changes made in PR #59555 to understand how it attempted to fix the issue and identify potential gaps or overlooked code paths that might still be causing the error.
  • Investigate the recent issues #67400 and #67799, which were reported on version v2026.4.14, to see if they provide any clues about what might be causing the regression or if they are related to the same underlying problem.
  • Consider temporarily downgrading to a version before the v2026.3.x update cycle to verify if the issue is indeed a regression introduced in that cycle.
  • Examine the gateway logs and the security audit messages to understand the sequence of events leading to the "pairing required" error and identify any potential misconfigurations or authentication issues.

Example

No specific code snippet can be provided without more detailed information about the implementation of PR #59555 and the surrounding codebase. However, any fix would likely involve modifications to the authentication, authorization, or WebSocket connection handling code to ensure proper pairing and scope upgrades for subagent spawning.

Notes

The complexity of the issue and the presence of multiple related bugs suggest that a thorough review of the codebase and the changes introduced in recent updates is necessary. The fact that PR #59555 was intended to fix this issue but did not suggests that there might be multiple factors at play, and addressing them will require a comprehensive approach.

Recommendation

Apply a workaround by using an older version of OpenClaw that does not exhibit this issue, while the development team re-examines and addresses the root cause of the problem in the latest versions. This will allow for continued use of the subagent spawning feature, albeit with potential limitations or security concerns associated with using an older version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Subagent spawning still broken on v2026.4.15 — pairing required regression after PR #59555 [1 comments, 2 participants]