openclaw - 💡(How to fix) Fix [Feature Request] Auto-hide ephemeral/isolated sessions from session bar after task completion [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#60794Fetched 2026-04-08 02:47:07
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Fix Action

Fix / Workaround

Current Workarounds

Code Example

{
  sessions: {
    ephemeralAutoCleanup: true,
    ephemeralAutoCleanupDelay: 5000, // ms after completion
  }
}

---

{
  deleteAfterRun: true
}
RAW_BUFFERClick to expand / collapse

Problem

When using sessions_spawn or cron with sessionTarget: "isolated", temporary sub-agent sessions remain visible in the session bar even after the task completes. These sessions clutter the UI and provide no value to the end user.

Proposed Solution

Allow ephemeral/isolated sessions to be automatically removed from the session bar after task completion. Options:

Option 1 — Global config:

{
  sessions: {
    ephemeralAutoCleanup: true,
    ephemeralAutoCleanupDelay: 5000, // ms after completion
  }
}

Option 2 — Per-cron flag:

{
  deleteAfterRun: true
}

Use Cases

  • Scheduled tasks (e.g. daily reports, monitoring alerts) should disappear from the session bar after delivering their result
  • Background sessions_spawn tasks should be removable from the UI after delivering output
  • Users running many automated tasks accumulate dozens of irrelevant finished sessions

Current Workarounds

  • openclaw sessions cleanup — not automatic, requires manual action
  • Session expiry (idle timeout / daily 4AM reset) — too slow
  • /new command — only creates a new session, doesn't remove old ones

Scope

This affects:

  • cron jobs with sessionTarget: "isolated"
  • sessions_spawn background/isolated sessions
  • Any temporary delegate sessions

extent analysis

TL;DR

Enable automatic removal of ephemeral sessions from the session bar by setting ephemeralAutoCleanup to true in the global config or using the deleteAfterRun flag per-cron job.

Guidance

  • To automatically remove ephemeral sessions, consider implementing Option 1 — Global config: set ephemeralAutoCleanup to true and adjust the ephemeralAutoCleanupDelay as needed.
  • For more granular control, use Option 2 — Per-cron flag: set deleteAfterRun to true for specific cron jobs.
  • Verify the fix by running a scheduled task or background sessions_spawn task and checking if the session is automatically removed from the session bar after completion.
  • Test different delay values for ephemeralAutoCleanupDelay to find the optimal balance between session removal and potential debugging needs.

Example

{
  sessions: {
    ephemeralAutoCleanup: true,
    ephemeralAutoCleanupDelay: 1000 // adjust delay as needed
  }
}

Notes

The proposed solution assumes that the ephemeralAutoCleanup and deleteAfterRun options will be implemented and functional. If these options are not available, alternative workarounds such as openclaw sessions cleanup or session expiry may need to be used.

Recommendation

Apply workaround by using Option 1 — Global config and setting ephemeralAutoCleanup to true, as this provides a more comprehensive solution for automatically removing ephemeral sessions.

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