openclaw - 💡(How to fix) Fix [Feature Request] Add progress callback support for subagent runtime [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#52242Fetched 2026-04-08 01:13:49
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Fix Action

Fix / Workaround

  1. Using runtime: "acp" instead - Requires configuring acp.defaultAgent
  2. Optimizing start/complete notifications - Current workaround (implemented in gying-search-browser skill v3.4)
  3. Using external messaging - Adds complexity

🟡 Medium - Current workaround is acceptable, but real-time progress would significantly improve UX for long-running tasks.

RAW_BUFFERClick to expand / collapse

Is your feature request related to a problem? Please describe.

When using sessions_spawn with runtime="subagent" for long-running tasks (e.g., browser automation, web scraping), there is no way to report intermediate progress to the parent session. Users have to wait without any feedback until the task completes, which can take 15-30 seconds or more.

This is particularly problematic for skills like:

  • Browser automation (searching, extracting data)
  • Multi-step workflows (navigate → extract → process → save)
  • Any task that takes >10 seconds to complete

Describe the solution you'd like

Add one of the following mechanisms to enable progress reporting from subagents:

Option A: Add sessionKey injection for subagents

When spawning a subagent, automatically pass the parent session's sessionKey as an environment variable or parameter.

Option B: Add progress callback mechanism

Add a new parameter for progress callbacks (e.g., --onProgress "announce").

Option C: Extend streamTo to support subagent

Currently streamTo: "parent" only works with runtime: "acp". Extend it to support runtime: "subagent".

Describe alternatives you've considered

  1. Using runtime: "acp" instead - Requires configuring acp.defaultAgent
  2. Optimizing start/complete notifications - Current workaround (implemented in gying-search-browser skill v3.4)
  3. Using external messaging - Adds complexity

Additional context

Use case: gying-search-browser skill for searching movie/TV resources on gying.net

Technical investigation:

  • streamTo: "parent" currently only supports runtime: "acp"
  • sessions_send requires sessionKey, which subagents cannot access
  • Subagents are isolated sessions by design (understandable for security)

Priority

🟡 Medium - Current workaround is acceptable, but real-time progress would significantly improve UX for long-running tasks.

extent analysis

Fix Plan

To enable progress reporting from subagents, we will implement Option B: Add progress callback mechanism. This involves adding a new parameter for progress callbacks.

Steps to Implement the Fix

  • Add a new parameter --onProgress to the sessions_spawn function.
  • Modify the subagent to accept the --onProgress parameter and use it to send progress updates to the parent session.
  • Update the parent session to receive and handle progress updates from the subagent.

Example Code

// In sessions_spawn function
const spawnSubagent = (options) => {
  // ...
  const progressCallback = options.onProgress;
  // ...

  // In the subagent
  const sendProgressUpdate = (progress) => {
    if (progressCallback) {
      progressCallback(progress);
    }
  };

  // In the parent session
  const onProgress = (progress) => {
    console.log(`Received progress update: ${progress}`);
  };

  const options = {
    runtime: 'subagent',
    onProgress: onProgress,
  };

  sessions_spawn(options);

Verification

To verify that the fix worked, spawn a subagent with the --onProgress parameter and check that the parent session receives progress updates.

Extra Tips

  • Ensure that the --onProgress parameter is properly validated and sanitized to prevent security vulnerabilities.
  • Consider adding a timeout or retry mechanism to handle cases where the subagent fails to send progress updates.
  • Document the new --onProgress parameter and its usage in the API documentation.

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] Add progress callback support for subagent runtime [1 participants]