openclaw - ✅(Solved) Fix Bug: Control UI sessions list defaults can trigger expensive full-history scans [1 pull requests, 2 comments, 3 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#76050Fetched 2026-05-03 04:42:51
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
2
Author
Timeline (top)
commented ×2closed ×1cross-referenced ×1unsubscribed ×1

The Control UI Sessions tab currently initializes with an unbounded activeMinutes filter and a default limit of 120. On instances with a larger session history, this can make the first sessions.list call scan too much history and periodically block the gateway/UI for several seconds.

A safer default is to load recent sessions only and keep the filter editable for users who need older history.

Root Cause

The Control UI Sessions tab currently initializes with an unbounded activeMinutes filter and a default limit of 120. On instances with a larger session history, this can make the first sessions.list call scan too much history and periodically block the gateway/UI for several seconds.

A safer default is to load recent sessions only and keep the filter editable for users who need older history.

Fix Action

Fix / Workaround

After applying a local source-equivalent hotfix and cache-busting the served UI bundle, the first bounded call was lower and subsequent calls were fast:

PR fix notes

PR #76051: fix(control-ui): bound default sessions query

Description (problem / solution / changelog)

Summary

  • bound the default Control UI Sessions tab query to the last 120 minutes
  • reduce the default Sessions tab limit from 120 to 50
  • preserve editable filters so users can still widen or clear the range when needed

Fixes #76050.

Verification

  • pnpm --dir ui exec vitest run --config vitest.config.ts src/ui/controllers/sessions.test.ts src/ui/views/sessions.test.ts src/ui/app-gateway.sessions.node.test.ts
    • 3 files passed, 26 tests passed
  • pnpm ui:build
    • build completed successfully

Local performance observation

On a long-running local gateway, unbounded/default Sessions tab reads produced sessions.list timings up to ~24–28s. With the bounded defaults applied in a local hotfix, post-reload calls dropped to 4019ms, then 112ms and 508ms.

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • docs/.generated/config-baseline.sha256 (modified, +2/-2)
  • src/agents/pi-embedded-runner/compact.hooks.harness.ts (modified, +1/-0)
  • ui/src/ui/app.ts (modified, +2/-2)
RAW_BUFFERClick to expand / collapse

Summary

The Control UI Sessions tab currently initializes with an unbounded activeMinutes filter and a default limit of 120. On instances with a larger session history, this can make the first sessions.list call scan too much history and periodically block the gateway/UI for several seconds.

A safer default is to load recent sessions only and keep the filter editable for users who need older history.

Observed locally

On a long-running local OpenClaw gateway, Control UI sessions.list calls before bounding were frequently slow:

  • 24567ms
  • 24571ms
  • 28344ms
  • 24492ms
  • repeated ~6000ms calls

After applying a local source-equivalent hotfix and cache-busting the served UI bundle, the first bounded call was lower and subsequent calls were fast:

  • 4019ms initial post-reload call
  • 112ms
  • 508ms

Expected behavior

The default Control UI Sessions view should avoid expensive full-history reads while preserving access to older sessions via user-editable filters.

Proposed fix

Initialize the Sessions tab filters to:

  • activeMinutes = "120"
  • limit = "50"

This keeps the default query bounded without changing the API or removing user access to older sessions.

Notes

This is intentionally a UI default change only. Users can still widen/clear filters in the Sessions tab when they need broader history.

extent analysis

TL;DR

Initialize the Sessions tab filters with bounded defaults to prevent slow sessions.list calls.

Guidance

  • Set activeMinutes to a reasonable default value (e.g., "120") to limit the initial session history scan.
  • Set limit to a smaller value (e.g., "50") to reduce the number of sessions loaded initially.
  • Verify the performance improvement by measuring the response time of the sessions.list call after applying the fix.
  • Consider monitoring user behavior to determine if the default filter values need to be adjusted further.

Example

No code snippet is provided as the issue suggests a configuration change rather than a code modification.

Notes

This fix only changes the default UI behavior and does not affect the underlying API or user access to older sessions.

Recommendation

Apply the proposed fix by initializing the Sessions tab filters with activeMinutes = "120" and limit = "50" to improve performance without restricting user access to older 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…

FAQ

Expected behavior

The default Control UI Sessions view should avoid expensive full-history reads while preserving access to older sessions via user-editable filters.

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 - ✅(Solved) Fix Bug: Control UI sessions list defaults can trigger expensive full-history scans [1 pull requests, 2 comments, 3 participants]