openclaw - 💡(How to fix) Fix [Feature]: ACP persistent session reuse via sessions_spawn

Official PRs (…)
ON THIS PAGE

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…

Body:

Current behavior

sessions_spawn with runtime="acp" only supports mode: "run" (oneshot). There is no way for the agent to create or reuse a persistent ACP session programmatically.

Users can manually create persistent ACP sessions via /acp spawn --mode persistent --thread auto, but the agent has no tool to do the same.

Use case

When using OpenClaw with Feishu (飞书) as the channel and acpx-bridge as the ACP backend, we want:

  1. Agent automatically creates a persistent ACP session with thread binding on first interaction
  2. Subsequent messages in the same conversation reuse the same Claude Code session
  3. Claude Code maintains context across multiple interactions

Current workaround

  • User manually types /acp spawn claude --mode persistent --thread auto in Feishu
  • This works but breaks the agent-driven workflow
  • Agent cannot create persistent sessions via sessions_spawn

Expected behavior

sessions_spawn should support mode: "persistent" (or equivalent) so the agent can:

  • Create persistent ACP sessions automatically
  • Reuse existing idle ACP sessions instead of creating new ones
  • Maintain context across multiple interactions without user intervention

Environment

  • OpenClaw version: 2026.5.7
  • Channel: Feishu (飞书)
  • ACP backend: acpx (acpx-bridge-cli)
  • ACP agent: claude-agent-acp (Claude Code)
  • Feishu plugin: modified to support defaultTopLevelPlacement: "child" and capabilities: { placements: ["current", "child"] }

Related

  • #67638 (Idle persistent ACP sessions consume maxConcurrentSessions)
  • Feishu thread binding requires plugin modification to support "child" placement

Root Cause

Body:

Current behavior

sessions_spawn with runtime="acp" only supports mode: "run" (oneshot). There is no way for the agent to create or reuse a persistent ACP session programmatically.

Users can manually create persistent ACP sessions via /acp spawn --mode persistent --thread auto, but the agent has no tool to do the same.

Use case

When using OpenClaw with Feishu (飞书) as the channel and acpx-bridge as the ACP backend, we want:

  1. Agent automatically creates a persistent ACP session with thread binding on first interaction
  2. Subsequent messages in the same conversation reuse the same Claude Code session
  3. Claude Code maintains context across multiple interactions

Current workaround

  • User manually types /acp spawn claude --mode persistent --thread auto in Feishu
  • This works but breaks the agent-driven workflow
  • Agent cannot create persistent sessions via sessions_spawn

Expected behavior

sessions_spawn should support mode: "persistent" (or equivalent) so the agent can:

  • Create persistent ACP sessions automatically
  • Reuse existing idle ACP sessions instead of creating new ones
  • Maintain context across multiple interactions without user intervention

Environment

  • OpenClaw version: 2026.5.7
  • Channel: Feishu (飞书)
  • ACP backend: acpx (acpx-bridge-cli)
  • ACP agent: claude-agent-acp (Claude Code)
  • Feishu plugin: modified to support defaultTopLevelPlacement: "child" and capabilities: { placements: ["current", "child"] }

Related

  • #67638 (Idle persistent ACP sessions consume maxConcurrentSessions)
  • Feishu thread binding requires plugin modification to support "child" placement

Fix Action

Fix / Workaround

Current workaround

RAW_BUFFERClick to expand / collapse

Summary

Body:

Current behavior

sessions_spawn with runtime="acp" only supports mode: "run" (oneshot). There is no way for the agent to create or reuse a persistent ACP session programmatically.

Users can manually create persistent ACP sessions via /acp spawn --mode persistent --thread auto, but the agent has no tool to do the same.

Use case

When using OpenClaw with Feishu (飞书) as the channel and acpx-bridge as the ACP backend, we want:

  1. Agent automatically creates a persistent ACP session with thread binding on first interaction
  2. Subsequent messages in the same conversation reuse the same Claude Code session
  3. Claude Code maintains context across multiple interactions

Current workaround

  • User manually types /acp spawn claude --mode persistent --thread auto in Feishu
  • This works but breaks the agent-driven workflow
  • Agent cannot create persistent sessions via sessions_spawn

Expected behavior

sessions_spawn should support mode: "persistent" (or equivalent) so the agent can:

  • Create persistent ACP sessions automatically
  • Reuse existing idle ACP sessions instead of creating new ones
  • Maintain context across multiple interactions without user intervention

Environment

  • OpenClaw version: 2026.5.7
  • Channel: Feishu (飞书)
  • ACP backend: acpx (acpx-bridge-cli)
  • ACP agent: claude-agent-acp (Claude Code)
  • Feishu plugin: modified to support defaultTopLevelPlacement: "child" and capabilities: { placements: ["current", "child"] }

Related

  • #67638 (Idle persistent ACP sessions consume maxConcurrentSessions)
  • Feishu thread binding requires plugin modification to support "child" placement

Problem to solve

sessions_spawn only supports mode: "run" (oneshot), not mode: "persistent". Agents cannot automatically create or reuse persistent ACP sessions, causing every interaction to create a new Claude Code session and lose context. Users must manually type /acp spawn --mode persistent to enable session reuse, breaking the agent-driven automation workflow.

Proposed solution

  1. Add mode: "persistent" support to sessions_spawn tool definition for ACP runtime
  2. When spawning, check for existing idle persistent ACP sessions for the same agent/channel and reuse them instead of creating new ones
  3. Add thread binding support for non-Discord channels (e.g., Feishu) in the sessions_spawn tool

Alternatives considered

  1. Users manually type /acp spawn --mode persistent --thread auto — 1. Users manually type /acp spawn --mode persistent --thread auto — works but breaks agent automation workflow ⠏ streaming • 2s | connected
  2. Agent calls sessions_send to route messages to existing sessions — has routing/delivery issues (#13374, #31671, #44153)
  3. Agent maintains session key mapping in files and uses sessions_send — fragile and not integrated with OpenClaw's session lifecycle

Impact

Enables agent-driven persistent ACP workflows across all channels (Feishu, Discord, Slack, etc.). Fixes the automation gap where agents cannot maintain context with external coding harnesses like Claude Code, Codex, Gemini CLI. Related to #67638 (idle persistent sessions consuming concurrency slots without reuse path).

Evidence/examples

No response

Additional information

No response

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 [Feature]: ACP persistent session reuse via sessions_spawn