openclaw - 💡(How to fix) Fix Feature Request: Expose sessions_spawn via Tool API for Lobster / external orchestration [1 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#60441Fetched 2026-04-08 02:51:12
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Expose sessions_spawn (subagent spawning) as an available tool through the OpenClaw Tool API endpoint (/api/tools/call), so that external orchestrators like Lobster can spawn isolated agent sessions as pipeline steps.

Root Cause

Expose sessions_spawn (subagent spawning) as an available tool through the OpenClaw Tool API endpoint (/api/tools/call), so that external orchestrators like Lobster can spawn isolated agent sessions as pipeline steps.

Code Example

subagent1 完了通知 (数千トークン)Felix context に蓄積
subagent2 完了通知 (数千トークン)Felix context に蓄積
× 6-8 steps → context 肥大 → timeout

---

steps:
  - id: pm
    # spawn PM agent
  - id: builder  
    # spawn Builder agent
  - id: tester
    # spawn Tester agent
  - id: review
    # spawn Auditor agent
  - id: approval
    approval: "Approve delivery?"
  - id: deploy
    # spawn Operator agent

---

lobster 'openclaw.invoke --tool sessions_spawn --action run --args-json "{...}"'
# → 404: Tool not available: sessions_spawn
RAW_BUFFERClick to expand / collapse

Feature Request: Expose sessions_spawn via Tool API (for Lobster / external orchestration)

Summary

Expose sessions_spawn (subagent spawning) as an available tool through the OpenClaw Tool API endpoint (/api/tools/call), so that external orchestrators like Lobster can spawn isolated agent sessions as pipeline steps.

Use Case

We're building a multi-agent AI organization where specialized agents (PM, Builder, Designer, Tester, Auditor) execute sequentially in a development pipeline. Each agent has its own system prompt (agents/*.md) and follows pod-specific rules (pods/*.md).

Current Problem

When Felix (the orchestrator agent) chains subagent spawns via sessions_spawn, each completion notification accumulates in Felix's context window:

subagent1 完了通知 (数千トークン) → Felix context に蓄積
subagent2 完了通知 (数千トークン) → Felix context に蓄積
× 6-8 steps → context 肥大 → timeout

Attempted Solution

We installed Lobster and created a .lobster workflow file to orchestrate the pipeline:

steps:
  - id: pm
    # spawn PM agent
  - id: builder  
    # spawn Builder agent
  - id: tester
    # spawn Tester agent
  - id: review
    # spawn Auditor agent
  - id: approval
    approval: "Approve delivery?"
  - id: deploy
    # spawn Operator agent

Lobster's approval gates, sequential execution, and context isolation work perfectly. However, sessions_spawn is not available via the Tool API:

lobster 'openclaw.invoke --tool sessions_spawn --action run --args-json "{...}"'
# → 404: Tool not available: sessions_spawn

This means we cannot spawn OpenClaw subagents from Lobster pipelines, forcing us to either:

  1. Fall back to Felix-mediated chaining (context bloat problem remains)
  2. Use raw CLI calls (loses OpenClaw agent management, tools, memory)

Proposed Solution

Expose sessions_spawn (and optionally sessions_send, sessions_yield) through the Tool API so that openclaw.invoke can call them from Lobster pipelines.

This would enable:

  • Durable multi-agent pipelines via Lobster with full OpenClaw subagent capabilities
  • Context isolation (each agent runs in its own session, no context bloat)
  • Built-in approval gates (Lobster's approval: steps)
  • Resume tokens (pipeline can pause and resume across gateway restarts)

Environment

  • OpenClaw: 2026.4.2
  • Lobster: 2026.1.21-1
  • OS: macOS (Apple Silicon)

Related

extent analysis

TL;DR

Expose sessions_spawn through the OpenClaw Tool API to enable durable multi-agent pipelines via Lobster with full OpenClaw subagent capabilities.

Guidance

  • Review the OpenClaw Tool API documentation to understand the process of exposing new tools, such as sessions_spawn.
  • Investigate the feasibility of adding sessions_spawn as a new tool endpoint (/api/tools/call) in the OpenClaw API.
  • Consider the potential benefits and limitations of exposing sessions_spawn and other related tools (sessions_send, sessions_yield) through the Tool API.
  • Evaluate the compatibility of the proposed solution with the current versions of OpenClaw (2026.4.2) and Lobster (2026.1.21-1).

Notes

The proposed solution relies on modifying the OpenClaw Tool API, which may require significant development and testing efforts. Additionally, the solution may be dependent on the specific versions of OpenClaw and Lobster being used.

Recommendation

Apply workaround: Implement a custom solution to expose sessions_spawn through the Tool API, as this would enable the desired functionality and provide a more robust and scalable solution for multi-agent pipelines.

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 Request: Expose sessions_spawn via Tool API for Lobster / external orchestration [1 participants]