openclaw - 💡(How to fix) Fix Subagent compaction loses running exec process references

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…

Fix Action

Fix / Workaround

Current Workaround

RAW_BUFFERClick to expand / collapse

Problem

When a subagent session undergoes compaction while it has a running exec process, the process session reference is lost. The actual process may continue running but becomes orphaned — the subagent can no longer poll/log/write to it, and cannot detect completion.

Steps to Reproduce

  1. Spawn a subagent with a long-running task
  2. The subagent starts an exec process and begins polling it
  3. Subagent session undergoes compaction (context window fills up)
  4. After compaction, the exec session ID is lost; subsequent poll attempts fail with "No session found"
  5. The underlying process may still be running but results are unreachable

Expected Behavior

Either:

  • Exec process references should survive compaction (they are tool state, not conversation context), or
  • There should be a mechanism to reattach to running processes after compaction

Current Workaround

Using nohup + log file + result file pattern, subagent only checks for output file existence rather than holding a process reference. This works but loses real-time progress monitoring.

Environment

  • OpenClaw: 2026.5.3
  • OS: WSL2 Ubuntu
  • Subagent with runTimeoutSeconds: 1800

Impact

Subagents cannot reliably manage long-running tasks (data collection, model training). The longer the task, the more likely compaction occurs mid-run.

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 Subagent compaction loses running exec process references