openclaw - ✅(Solved) Fix Per-turn latency regression on 2026.4.29 vs 2026.4.24 with active-memory disabled (~4s → ~15s) [1 pull requests, 1 comments, 2 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#75906Fetched 2026-05-03 04:44:24
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
2
Timeline (top)
closed ×1commented ×1cross-referenced ×1subscribed ×1

After upgrading from 2026.4.24 to 2026.4.29, per-turn Telegram latency regressed from ~4s to ~15s on a fresh /new session AND on subsequent turns in the same session. Same config, same workspace, same hardware. Rolling back to 2026.4.24 restores ~4s latency.

The regression is per-turn (not just cold-start), and persists with plugins.entries["active-memory"].enabled = false, so the new Active Memory features in 4.29 don't appear to be the direct cause.

Root Cause

After upgrading from 2026.4.24 to 2026.4.29, per-turn Telegram latency regressed from ~4s to ~15s on a fresh /new session AND on subsequent turns in the same session. Same config, same workspace, same hardware. Rolling back to 2026.4.24 restores ~4s latency.

The regression is per-turn (not just cold-start), and persists with plugins.entries["active-memory"].enabled = false, so the new Active Memory features in 4.29 don't appear to be the direct cause.

Fix Action

Workaround

Pinning to 2026.4.24 with plugins.entries["active-memory"].enabled = false. Latency is acceptable there.Happy to run additional diagnostics if it would help isolate. Have full SSH and CLI access, can capture debug-level logs of a single turn, can A/B specific config flags.

PR fix notes

PR #75922: Fix plugin-only tool and registry latency regressions

Description (problem / solution / changelog)

Summary

  • Skip core coding tool construction when an explicit allowlist only requests plugin tools.
  • Keep the full workspace plugin registry cache separate from scoped plugin registry loads.
  • Add regressions for both latency paths.

Tests

  • OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test src/agents/pi-embedded-runner/run/attempt.tools-allow-regression.test.ts src/agents/pi-embedded-runner/run/attempt.test.ts src/agents/tool-policy.plugin-only-allowlist.test.ts src/agents/pi-tools.create-openclaw-coding-tools.test.ts src/plugins/plugin-lru-cache.test.ts src/plugins/loader.runtime-registry.test.ts src/plugins/loader.test.ts
  • pnpm exec oxfmt --check --threads=1 src/agents/pi-embedded-runner/run/attempt.ts src/agents/pi-embedded-runner/run/attempt.spawn-workspace.test-support.ts src/agents/pi-embedded-runner/run/attempt.tools-allow-regression.test.ts src/plugins/loader.ts src/plugins/loader.runtime-registry.test.ts
  • git diff --check origin/main...HEAD

Fixes #75882 Fixes #75907 Fixes #75906 Fixes #75887 Fixes #75851

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/agents/pi-embedded-runner/run/attempt.spawn-workspace.test-support.ts (modified, +36/-20)
  • src/agents/pi-embedded-runner/run/attempt.tools-allow-regression.test.ts (added, +59/-0)
  • src/agents/pi-embedded-runner/run/attempt.ts (modified, +53/-4)
  • src/agents/pi-tools.ts (modified, +190/-145)
  • src/plugins/loader.runtime-registry.test.ts (modified, +28/-1)
  • src/plugins/loader.ts (modified, +40/-20)
RAW_BUFFERClick to expand / collapse

Summary

After upgrading from 2026.4.24 to 2026.4.29, per-turn Telegram latency regressed from ~4s to ~15s on a fresh /new session AND on subsequent turns in the same session. Same config, same workspace, same hardware. Rolling back to 2026.4.24 restores ~4s latency.

The regression is per-turn (not just cold-start), and persists with plugins.entries["active-memory"].enabled = false, so the new Active Memory features in 4.29 don't appear to be the direct cause.

Environment

  • Host: Mac mini M4, macOS 26.3
  • Node: 22.22.2 (gateway), 25.8.2 (CLI)
  • OpenClaw versions tested: 2026.4.1 (historical baseline, fast), 2026.4.24 (fast with active-memory disabled), 2026.4.29 (slow)
  • Default model: anthropic/claude-opus-4-7
  • 6 agents, 18 cron jobs, 4 Telegram bots
  • Loopback gateway, single-user setup
  • 49 plugins enabled
  • RSS baseline 600-800 MB on 4.29

Reproduction

  1. On 2026.4.24 with plugins.entries["active-memory"].enabled = false: /new + "say hi" on Telegram completes in ~4s.
  2. Upgrade to 2026.4.29 via npm install -g openclaw@latest. Carry the same config forward (active-memory still disabled).
  3. Restart gateway: openclaw gateway install --force.
  4. Wait for ready, then /new + "say hi" on Telegram.
  5. Observed: ~15s. Second message in same session: also ~15s.
  6. Roll back to 2026.4.24: latency returns to ~4s.

What I ruled out

  • Active Memory plugin firing: Verified via source read of plugin code on 4.24. With empty agents: [] allowlist (the default), isEnabledForAgent returns false on every turn → plugin loads but never invokes. Confirmed by zero traces in gateway logs. Setting enabled: false makes this even more conclusive.
  • Cold-start cost only: Second turn in same session is also ~15s, so this is per-turn, not just cold prefill.
  • Bootstrap context size: SOUL.md is 10,849 chars, well within the 12,000 cap. Per-turn context is the same as what 4.24 happily handles in 4s.
  • Provider cooldown / fallback: Verified usageStats is empty in auth-profiles.json. No errorCount, no disabledUntil. Default model still anthropic/claude-opus-4-7.
  • Cron jobs / sessions: All 18 cron jobs status:ok post-upgrade. Session count stable.
  • Telegram deps: Reinstalled grammy, @grammyjs/runner, @grammyjs/transformer-throttler with --legacy-peer-deps post-upgrade per documented protocol.

Suspects (not yet isolated)

Features new in 4.25–4.29 that could add per-turn cost:

  • Active-run steering by default (4.29 highlight)
  • Visible-reply enforcement (4.29)
  • Spawned subagent routing metadata (4.29)
  • People-aware memory wiki + provenance views (4.29) — this is a separate code path from Active Memory and may have its own per-turn hook
  • Per-conversation Active Memory filters (4.27/4.29) — could fire even with the plugin disabled if the filter check itself is per-turn
  • Bounded REM preview diagnostics (4.29)

Without per-turn timing instrumentation at INFO log level (which doesn't exist), I can't isolate which subsystem is eating the seconds.

Asks

  1. Is per-turn timing observability planned? Provider call duration, bootstrap injection time, hook handler time at INFO level would make this kind of diagnosis tractable.
  2. Are any of the 4.29 features I listed enabled-by-default with their own per-turn LLM calls or sync I/O that 4.24 didn't have?
  3. Is there a config knob to disable the new memory wiki / REM preview / steering features for users who don't want them?

Workaround

Pinning to 2026.4.24 with plugins.entries["active-memory"].enabled = false. Latency is acceptable there.Happy to run additional diagnostics if it would help isolate. Have full SSH and CLI access, can capture debug-level logs of a single turn, can A/B specific config flags.

extent analysis

TL;DR

The most likely fix or workaround for the per-turn Telegram latency regression is to identify and disable the specific feature introduced in version 2026.4.29 that is causing the increased latency.

Guidance

  1. Investigate new features: Focus on features introduced in versions 4.25-4.29, such as Active-run steering, Visible-reply enforcement, Spawned subagent routing metadata, People-aware memory wiki, and Per-conversation Active Memory filters, to determine which one is causing the latency increase.
  2. Check for default enablement: Verify if any of these features are enabled by default and if they make per-turn LLM calls or sync I/O that could contribute to the latency.
  3. Look for config knobs: Search for configuration options to disable these features, especially the memory wiki, REM preview, and steering features, to see if disabling them resolves the latency issue.
  4. Enable debug logging: Capture debug-level logs of a single turn to gather more information about the latency and potentially identify the culprit feature.
  5. Test incremental upgrades: If possible, try upgrading incrementally from 2026.4.24 to 2026.4.29, testing the latency after each minor version upgrade to isolate the specific version that introduces the regression.

Example

No specific code snippet is provided as the issue is more related to configuration and feature identification.

Notes

The lack of per-turn timing instrumentation at the INFO log level makes it challenging to diagnose the issue. The provided information suggests that the regression is not directly related to the Active Memory plugin, but other features introduced in version 2026.4.29 might be the cause.

Recommendation

Apply a workaround by pinning to version 2026.4.24 with plugins.entries["active-memory"].enabled = false until the specific cause of the latency regression is identified and a fix is available. This ensures acceptable latency while allowing for further investigation into the root

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