openclaw - 💡(How to fix) Fix Cron isolated sessions have no access to main session history for non-default agents [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#72856Fetched 2026-04-28 06:31:21
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Error Message

  • Error: sessionTarget "main" is only valid for the default agent

Fix Action

Workaround

Currently no clean workaround. Options include:

  1. Reading raw transcript files (.jsonl) from the agent's session directory
  2. Having agents proactively write memory during conversations instead of relying on cron
RAW_BUFFERClick to expand / collapse

Problem

When using --session isolated for cron jobs on non-default agents, the isolated session starts fresh with no access to the main conversation history. This makes it impossible for the cron job to summarize or reference past conversations.

Use Case

I want to create a daily memory cron job that runs at 2 AM for each agent, summarizing the day's important events, decisions, and lessons learned into memory/YYYY-MM-DD.md.

Current Behavior

  • Default agent (main) can use --session main --system-event which runs in the main session with full history access ✅
  • Non-default agents are forced to use --session isolated --message which creates a fresh session with no history ❌
  • Error: sessionTarget "main" is only valid for the default agent

Expected Behavior

Non-default agents should also be able to run cron jobs in their main session (or at least have access to the session transcript/history when running in isolated sessions).

Workaround

Currently no clean workaround. Options include:

  1. Reading raw transcript files (.jsonl) from the agent's session directory
  2. Having agents proactively write memory during conversations instead of relying on cron

Environment

  • OpenClaw version: 2026.4.22
  • OS: macOS 15.7.5 (arm64)
  • Channel: Feishu multi-agent setup (6 agents)

extent analysis

TL;DR

To fix the issue, consider modifying the cron job to read raw transcript files from the agent's session directory as a temporary workaround.

Guidance

  • Investigate the feasibility of reading raw transcript files (.jsonl) from the agent's session directory to access conversation history.
  • Explore alternative approaches to proactively write memory during conversations, reducing reliance on cron jobs.
  • Verify the --session isolated behavior for non-default agents to ensure it's not a configuration issue.
  • Check the OpenClaw documentation for any updates or planned changes to session management and cron job functionality.

Example

No code example is provided due to the lack of specific implementation details in the issue.

Notes

The provided workaround may not be ideal, and a more robust solution might require changes to the OpenClaw software or its configuration. The feasibility of reading raw transcript files depends on the specific requirements and constraints of the project.

Recommendation

Apply the workaround of reading raw transcript files from the agent's session directory, as it seems to be the most viable temporary solution given the current limitations of the --session isolated mode for non-default agents.

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 Cron isolated sessions have no access to main session history for non-default agents [1 participants]