openclaw - ✅(Solved) Fix Control UI still repeatedly calls slow sessions.list on 2026.4.29, causing Gateway latency/GC pressure [1 pull requests, 4 comments, 4 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#76166Fetched 2026-05-03 04:41:30
View on GitHub
Comments
4
Participants
4
Timeline
13
Reactions
2
Assignees
Timeline (top)
commented ×4cross-referenced ×4assigned ×1closed ×1

On OpenClaw 2026.4.29 (a448042), the local Control UI/webchat connection still repeatedly called sessions.list, and each call took about 10–11s on a large session store. This caused Gateway event-loop/GC pressure and user-visible RPC timeouts.

This looks like a regression or release-build mismatch with the earlier fix mentioned in #59317, which says Control UI should subscribe to sessions.changed instead of polling.

Error Message

A Chrome tab connected to local Gateway as:

Root Cause

On OpenClaw 2026.4.29 (a448042), the local Control UI/webchat connection still repeatedly called sessions.list, and each call took about 10–11s on a large session store. This caused Gateway event-loop/GC pressure and user-visible RPC timeouts.

This looks like a regression or release-build mismatch with the earlier fix mentioned in #59317, which says Control UI should subscribe to sessions.changed instead of polling.

Fix Action

Fix / Workaround

Mitigation result

PR fix notes

PR #76277: fix: reduce WebUI session latency churn

Description (problem / solution / changelog)

Summary

  • avoid a full Control UI sessions.list reload when a message-phase sessions.changed payload already patched local session state
  • pass known sessionKey through file-only transcript update events so Gateway event handling can skip transcript-file-to-session lookup on hot paths
  • make media generation provider discovery lazy for explicit image/video/music model config, including the music execution path without reference-image validation

Root Cause

The latency cluster mixed several hot-path costs: UI-side full list invalidation on message updates, Gateway transcript update events without session keys, and eager provider/tool materialization even when explicit generation model config already selected the provider/model.

Validation

  • pnpm test ui/src/ui/app-gateway.sessions.node.test.ts
  • pnpm test src/gateway/session-transcript-key.test.ts src/gateway/session-message-events.test.ts
  • pnpm test src/agents/tools/media-tool-shared.test.ts src/agents/tools/image-generate-tool.test.ts src/agents/tools/video-generate-tool.test.ts src/agents/tools/music-generate-tool.test.ts
  • pnpm test ui/src/ui/app-gateway.sessions.node.test.ts src/agents/pi-embedded-runner/compact.hooks.test.ts src/agents/pi-embedded-runner/transcript-rewrite.test.ts src/agents/pi-embedded-runner/tool-result-truncation.test.ts src/agents/tools/image-generate-tool.test.ts src/agents/tools/video-generate-tool.test.ts src/agents/tools/music-generate-tool.test.ts
  • pnpm exec oxfmt --check --threads=1 ...
  • pnpm check:changelog-attributions
  • Testbox: OPENCLAW_TESTBOX=1 pnpm check:changed

Triage Notes

prtags auth is valid, but prtags group list/search returned 502 during triage, so no duplicate group or gated @clawsweeper comment was written yet.

Refs https://github.com/openclaw/openclaw/issues/76236 Refs https://github.com/openclaw/openclaw/issues/76203 Refs https://github.com/openclaw/openclaw/issues/76188 Refs https://github.com/openclaw/openclaw/issues/76107 Refs https://github.com/openclaw/openclaw/issues/76166

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • docs/nodes/audio.md (modified, +0/-1)
  • docs/providers/arcee.md (modified, +12/-12)
  • docs/web/control-ui.md (modified, +0/-2)
  • docs/web/webchat.md (modified, +1/-2)
  • extensions/arcee/index.test.ts (modified, +0/-176)
  • extensions/arcee/index.ts (modified, +7/-12)
  • extensions/arcee/models.ts (modified, +5/-4)
  • extensions/arcee/provider-catalog.ts (modified, +28/-10)
  • extensions/arcee/provider-policy-api.test.ts (removed, +0/-73)
  • extensions/arcee/provider-policy-api.ts (removed, +0/-11)
  • extensions/arcee/provider-policy.ts (removed, +0/-132)
  • scripts/openclaw-npm-release-check.ts (modified, +10/-8)
  • src/agents/command/attempt-execution.ts (modified, +1/-1)
  • src/agents/pi-embedded-runner/compact.hooks.test.ts (modified, +12/-3)
  • src/agents/pi-embedded-runner/compaction-hooks.ts (modified, +1/-1)
  • src/agents/pi-embedded-runner/tool-result-truncation.test.ts (modified, +6/-0)
  • src/agents/pi-embedded-runner/tool-result-truncation.ts (modified, +8/-2)
  • src/agents/pi-embedded-runner/transcript-rewrite.test.ts (modified, +1/-1)
  • src/agents/pi-embedded-runner/transcript-rewrite.ts (modified, +4/-1)
  • src/agents/tools/image-generate-tool.test.ts (modified, +51/-6)
  • src/agents/tools/image-generate-tool.ts (modified, +12/-2)
  • src/agents/tools/media-tool-shared.ts (modified, +11/-3)
  • src/agents/tools/music-generate-tool.test.ts (modified, +57/-0)
  • src/agents/tools/music-generate-tool.ts (modified, +28/-10)
  • src/agents/tools/video-generate-tool.test.ts (modified, +53/-0)
  • src/agents/tools/video-generate-tool.ts (modified, +15/-2)
  • src/commands/channel-setup/plugin-install.test.ts (modified, +2/-2)
  • src/commands/onboarding-plugin-install.test.ts (modified, +5/-133)
  • src/commands/onboarding-plugin-install.ts (modified, +3/-8)
  • src/config/sessions/transcript.test.ts (modified, +4/-1)
  • src/config/sessions/transcript.ts (modified, +1/-1)
  • src/flows/channel-setup.status.test.ts (modified, +8/-99)
  • src/flows/channel-setup.status.ts (modified, +9/-9)
  • src/flows/channel-setup.test.ts (modified, +3/-75)
  • src/flows/channel-setup.ts (modified, +4/-5)
  • src/gateway/method-scopes.ts (modified, +0/-1)
  • src/gateway/server-methods-list.ts (modified, +0/-1)
  • src/gateway/server-methods.ts (modified, +0/-2)
  • src/gateway/server-methods/chat-transcribe-audio.runtime.ts (removed, +0/-1)
  • src/gateway/server-methods/chat-transcribe-audio.test.ts (removed, +0/-123)
  • src/gateway/server-methods/chat-transcribe-audio.ts (removed, +0/-125)
  • src/image-generation/runtime-types.ts (modified, +1/-0)
  • src/image-generation/runtime.test.ts (modified, +40/-0)
  • src/image-generation/runtime.ts (modified, +1/-0)
  • src/music-generation/runtime-types.ts (modified, +1/-0)
  • src/music-generation/runtime.test.ts (modified, +37/-0)
  • src/music-generation/runtime.ts (modified, +1/-0)
  • src/plugins/install.npm-spec.test.ts (modified, +0/-55)
  • src/plugins/install.ts (modified, +2/-23)
  • src/plugins/tool-descriptor-cache.test.ts (modified, +47/-1)
  • src/plugins/tool-descriptor-cache.ts (modified, +14/-3)
  • src/plugins/tools.optional.test.ts (modified, +49/-0)
  • src/video-generation/runtime-types.ts (modified, +1/-0)
  • src/video-generation/runtime.test.ts (modified, +37/-0)
  • src/video-generation/runtime.ts (modified, +1/-0)
  • ui/src/styles/chat/layout.css (modified, +0/-9)
  • ui/src/ui/app-chat.test.ts (modified, +0/-63)
  • ui/src/ui/app-chat.ts (modified, +0/-67)
  • ui/src/ui/app-gateway.sessions.node.test.ts (modified, +64/-1)
  • ui/src/ui/app-gateway.ts (modified, +17/-3)
  • ui/src/ui/app-lifecycle.node.test.ts (modified, +0/-3)
  • ui/src/ui/app-lifecycle.ts (modified, +0/-2)
  • ui/src/ui/app-render.ts (modified, +0/-3)
  • ui/src/ui/app-view-state.ts (modified, +1/-4)
  • ui/src/ui/app.test.ts (removed, +0/-205)
  • ui/src/ui/app.ts (modified, +0/-132)
  • ui/src/ui/controllers/sessions.test.ts (modified, +63/-1)
  • ui/src/ui/controllers/sessions.ts (modified, +17/-5)
  • ui/src/ui/views/chat.test.ts (modified, +1/-40)
  • ui/src/ui/views/chat.ts (modified, +10/-50)

Code Example

client=openclaw-control-ui webchat vcontrol-ui
conn=1a598069-706d-475b-837a-41e3e2a68c21

---

2026-05-02T22:06:42.868+08:00 [ws] ⇄ res ✓ sessions.list 19829ms conn=1a598069…8c21
2026-05-02T22:07:25.232+08:00 [ws] ⇄ res ✓ sessions.list 11286ms conn=1a598069…8c21
2026-05-02T23:13:55.129+08:00 [ws] ⇄ res ✓ sessions.list 10651ms conn=1a598069…8c21
2026-05-02T23:18:08.344+08:00 [ws] ⇄ res ✓ sessions.list 10712ms conn=1a598069…8c21

---

[diagnostic] liveness warning: reasons=event_loop_delay,event_loop_utilization,cpu ... eventLoopDelayMaxMs=10888.4 eventLoopUtilization=1 cpuCoreRatio=1.005
[fetch-timeout] fetch timeout reached; aborting operation
[agent/embedded] agent cleanup timed out ... step=pi-trajectory-flush timeoutMs=10000
[tools] sessions_send failed: gateway timeout after 10000ms

---

2026-05-02T23:21:15.944+08:00 [ws] webchat disconnected code=1001 reason=n/a conn=1a598069-706d-475b-837a-41e3e2a68c21
RAW_BUFFERClick to expand / collapse

Summary

On OpenClaw 2026.4.29 (a448042), the local Control UI/webchat connection still repeatedly called sessions.list, and each call took about 10–11s on a large session store. This caused Gateway event-loop/GC pressure and user-visible RPC timeouts.

This looks like a regression or release-build mismatch with the earlier fix mentioned in #59317, which says Control UI should subscribe to sessions.changed instead of polling.

Environment

  • OpenClaw: 2026.4.29 (a448042)
  • Host: macOS / Darwin arm64, Node 25.9.0
  • Gateway: local loopback 127.0.0.1:18789
  • Session directories are large:
    • ~/.openclaw/agents/main/sessions: ~395 MB
    • ~/.openclaw/agents/system-architect/sessions: ~383 MB
    • ~1012 session/jsonl-like files under ~/.openclaw

Observed behavior

A Chrome tab connected to local Gateway as:

client=openclaw-control-ui webchat vcontrol-ui
conn=1a598069-706d-475b-837a-41e3e2a68c21

From 2026-05-02T22:06+08:00 onward, Gateway logs showed repeated sessions.list calls from this connection. Examples:

2026-05-02T22:06:42.868+08:00 [ws] ⇄ res ✓ sessions.list 19829ms conn=1a598069…8c21
2026-05-02T22:07:25.232+08:00 [ws] ⇄ res ✓ sessions.list 11286ms conn=1a598069…8c21
2026-05-02T23:13:55.129+08:00 [ws] ⇄ res ✓ sessions.list 10651ms conn=1a598069…8c21
2026-05-02T23:18:08.344+08:00 [ws] ⇄ res ✓ sessions.list 10712ms conn=1a598069…8c21

Between 23:00 and 23:18, there were 51 sessions.list calls and 6 node.list calls from the same UI connection. sessions.list was consistently around 10–11s.

During the same window, Gateway showed liveness/timeout symptoms:

[diagnostic] liveness warning: reasons=event_loop_delay,event_loop_utilization,cpu ... eventLoopDelayMaxMs=10888.4 eventLoopUtilization=1 cpuCoreRatio=1.005
[fetch-timeout] fetch timeout reached; aborting operation
[agent/embedded] agent cleanup timed out ... step=pi-trajectory-flush timeoutMs=10000
[tools] sessions_send failed: gateway timeout after 10000ms

sample of the Gateway process showed significant time in V8 GC / heap marking. Gateway RSS/footprint reached roughly 1.0–1.7 GB during the incident.

Mitigation result

Closing the single Chrome tab for 127.0.0.1:18789 / localhost:18789 disconnected the UI TCP client:

2026-05-02T23:21:15.944+08:00 [ws] webchat disconnected code=1001 reason=n/a conn=1a598069-706d-475b-837a-41e3e2a68c21

After that:

  • no new sessions.list calls from that connection
  • no new liveness warning lines in the immediate post-close check
  • Gateway CPU dropped from high/near-100% bursts to low single digits / sub-1% most of the time
  • non-deep commands improved:
    • openclaw --version: ~104ms
    • openclaw config validate: ~1.6s
    • openclaw tasks flow show ... --json: ~1.2s

Expected behavior

Control UI should not continuously poll expensive sessions.list on large session stores. If #59317's subscribe/push behavior is intended, the release build should not keep issuing repeated sessions.list calls every ~10–30s while idle.

Additionally, sessions.list should probably avoid expensive transcript/session-derived computation unless explicitly requested, and/or cache rows so one UI tab cannot create sustained 10s RPC work.

Related issues

  • #59317 — closed as fixed: Control UI should use sessions.subscribe / sessions.changed instead of aggressive polling.
  • #75297 — closed as fixed on main: gateway event-loop saturation and very slow sessions.list / models.list.
  • #75688 — related 2026.4.29 gateway high CPU/latency report.

This report is for current released 2026.4.29, where the behavior is still reproducible in a real large-session-store environment.

extent analysis

TL;DR

The Control UI's repeated sessions.list calls are likely causing Gateway event-loop pressure and timeouts, and switching to sessions.subscribe and sessions.changed as intended in #59317 may resolve the issue.

Guidance

  • Verify that the Control UI is indeed polling sessions.list instead of subscribing to sessions.changed by checking the Gateway logs for repeated sessions.list calls.
  • Check the release build to ensure it aligns with the fix mentioned in #59317, which should use sessions.subscribe and sessions.changed instead of polling.
  • Consider implementing caching for sessions.list to reduce the load on the Gateway, especially for large session stores.
  • Monitor the Gateway's CPU usage and event-loop utilization to ensure that the fix does not introduce new performance issues.

Example

No code example is provided as the issue does not specify the exact implementation details.

Notes

The issue seems to be related to a regression or release-build mismatch, and resolving this may require verifying the implementation of #59317 and ensuring that the release build is correct.

Recommendation

Apply the workaround of closing the Chrome tab for 127.0.0.1:18789 / localhost:18789 to disconnect the UI TCP client, and consider upgrading to a version that includes the fix for #59317 if available, as this seems to be a regression.

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

Control UI should not continuously poll expensive sessions.list on large session stores. If #59317's subscribe/push behavior is intended, the release build should not keep issuing repeated sessions.list calls every ~10–30s while idle.

Additionally, sessions.list should probably avoid expensive transcript/session-derived computation unless explicitly requested, and/or cache rows so one UI tab cannot create sustained 10s RPC work.

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 Control UI still repeatedly calls slow sessions.list on 2026.4.29, causing Gateway latency/GC pressure [1 pull requests, 4 comments, 4 participants]