openclaw - 💡(How to fix) Fix Feature Request: Allow cron jobs to route to subagent persistent sessions [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#72529Fetched 2026-04-28 06:34:51
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0

Currently, cron jobs only support sessionTarget: main or sessionTarget: isolated. There is no way to route a cron job to an existing subagent persistent session (created via sessions_spawn with thread: true).

Root Cause

Currently, cron jobs only support sessionTarget: main or sessionTarget: isolated. There is no way to route a cron job to an existing subagent persistent session (created via sessions_spawn with thread: true).

RAW_BUFFERClick to expand / collapse

Summary

Currently, cron jobs only support sessionTarget: main or sessionTarget: isolated. There is no way to route a cron job to an existing subagent persistent session (created via sessions_spawn with thread: true).

Use Case

In a multi-agent setup, we have specialized sub-agents (e.g., a fandom news collector) with their own AGENTS.md rules, personality (SOUL.md), and persistent session history. We want cron jobs to directly wake up these sub-agents to perform their tasks, rather than:

  1. Option A: Cron → isolated session → sessions_send to subagent (adds latency, double context load)
  2. Option B: Cron → isolated session doing the work directly (works but loses sub-agent personality/rules from AGENTS.md/SOUL.md)

Proposed Solution

Add a new sessionTarget option, e.g. sessionTarget: subagent, that accepts a sessionKey pointing to an existing subagent persistent session. The cron job would then execute within that sub-agent session context, respecting its SOUL.md, AGENTS.md, and conversation history.

Alternatively, allow sessionTarget: isolated to optionally inherit a sub-agent workspace config (SOUL.md, AGENTS.md) without routing to its session.

Current Behavior

Using --session-key with sessionTarget: isolated sets the key but the session still runs as isolated (new session each time), ignoring the sub-agent existing session. The sessionKey only affects UI grouping, not actual routing.

Environment

  • OpenClaw 2026.4.15
  • subagent sessions created via sessions_spawn with thread: true, mode: session

extent analysis

TL;DR

To fix the issue, consider adding a new sessionTarget option that allows cron jobs to execute within an existing subagent persistent session context.

Guidance

  • Review the proposed solution to add a sessionTarget: subagent option that accepts a sessionKey pointing to an existing subagent persistent session.
  • Investigate modifying the sessionTarget: isolated option to optionally inherit a sub-agent workspace config without routing to its session.
  • Verify that using --session-key with sessionTarget: isolated currently only affects UI grouping and not actual routing.
  • Explore the OpenClaw documentation for any existing configuration options or workarounds that may achieve the desired behavior.

Example

No code snippet is provided as the issue does not contain sufficient code details.

Notes

The solution may require modifications to the OpenClaw configuration or the introduction of new features, which could have implications for the overall system architecture.

Recommendation

Apply a workaround by exploring alternative configuration options or waiting for a potential update to OpenClaw that addresses this issue, as there is no clear indication of a fixed version available.

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