openclaw - 💡(How to fix) Fix ACP sessions_spawn fails with "spawnedBy is only supported for subagent:* sessions" [2 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#43651Fetched 2026-04-08 00:16:22
View on GitHub
Comments
2
Participants
2
Timeline
4
Reactions
0
Timeline (top)
commented ×2closed ×1locked ×1

Error Message

sessions_spawn with runtime="acp" consistently fails with error: 4. Error occurs consistently Error: "spawnedBy is only supported for subagent:* sessions"

  • The error suggests a session type/naming convention mismatch

Fix Action

Workaround

Direct Claude Code CLI usage works fine:

claude "your task here"

Code Example

spawnedBy is only supported for subagent:* sessions

---

claude "your task here"
RAW_BUFFERClick to expand / collapse

Bug Description

sessions_spawn with runtime="acp" consistently fails with error:

spawnedBy is only supported for subagent:* sessions

Environment

  • OpenClaw: 2026.3.8 (3caab92)
  • OS: Ubuntu 24.04.4 LTS (ARM64)
  • Node: v22.22.0
  • Platform: AWS EC2 (Graviton 3)

Configuration

  • acpx plugin: loaded and enabled (version 2026.3.8-beta.1)
  • acpx CLI: available (v0.1.15)
  • Claude Code CLI: working (v2.1.71)
  • ACP config: enabled=true, backend="acpx", agents=["claude","codex","gemini"]
  • Environment vars: CLAUDE_CODE_USE_BEDROCK=1, AWS_REGION=us-west-2

Reproduction Steps

  1. Configure ACP with acpx backend
  2. Ensure acpx plugin is loaded
  3. Call sessions_spawn(runtime="acp", agentId="claude", mode="run", task="test")
  4. Error occurs consistently

Expected Behavior

ACP session should spawn and execute the task using Claude Code

Actual Behavior

Error: "spawnedBy is only supported for subagent:* sessions"

Workaround

Direct Claude Code CLI usage works fine:

claude "your task here"

Additional Context

  • All ACP components appear to be correctly installed and configured
  • The error suggests a session type/naming convention mismatch
  • This affects the core ACP integration functionality

Investigation Done

  • Verified acpx plugin is loaded: openclaw plugins list
  • Verified Claude Code CLI works: claude --version returns 2.1.71
  • Verified environment variables are set in systemd override
  • Checked configuration multiple times

The issue appears to be in the OpenClaw core session spawning logic when routing to ACP runtime.

extent analysis

Fix Plan

To resolve the issue with sessions_spawn failing when using runtime="acp", we need to adjust the session spawning logic to correctly handle ACP runtime sessions.

Step-by-Step Solution

  1. Update Session Spawning Logic: Modify the sessions_spawn function to check for runtime="acp" and handle it accordingly.
  2. Use Subagent Session Type: When runtime="acp", use a subagent session type to spawn the session.

Example Code Changes

def sessions_spawn(runtime, agent_id, mode, task):
    if runtime == "acp":
        # Use subagent session type for ACP runtime
        session_type = "subagent:*"
        # Spawn session with updated session type
        session = spawn_session(session_type, agent_id, mode, task)
        return session
    else:
        # Handle other runtimes as before
        # ...

Verification

To verify the fix, follow these steps:

  • Call sessions_spawn with runtime="acp" and verify that the session is spawned correctly.
  • Check the session type used to spawn the session and ensure it is subagent:*.
  • Test the execution of the task using the spawned session.

Extra Tips

  • Ensure that the acpx plugin is loaded and enabled.
  • Verify that the Claude Code CLI is working correctly.
  • Check the environment variables and configuration settings to ensure they are set correctly.

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 ACP sessions_spawn fails with "spawnedBy is only supported for subagent:* sessions" [2 comments, 2 participants]