Skip to content

[Bug]: Feishu/lark channel agent response extremely slow (26-46s per message) — core-plugin-tools and event loop delay #82073

Description

@8Sign24

Bug type

Performance issue

Summary

Feishu/Lark channel users experience 26-46 seconds response delay on every message. The slowness is not from model API inference (~1s) but from OpenClaw internal startup stages that run on every message, with no caching between runs.

When sending a simple message through Feishu, it takes 30-50 seconds before the agent even starts generating a reply. This applies to trivial queries.

Steps to reproduce

  1. Configure Feishu/Lark channel (openclaw-lark plugin)
  2. Send any message (e.g., "test" or "hello")
  3. Wait 30-50 seconds for a reply
  4. Check the logs at /tmp/openclaw/openclaw-YYYY-MM-DD.log

Actual behavior

Log output shows the bottleneck:

[trace:embedded-run] prep stages: totalMs=27293
  core-plugin-tools: 14062ms    ← 14 seconds loading plugin tools
  system-prompt: 5375ms          ← 5 seconds assembling system prompt
  stream-setup: 5292ms           ← 5 seconds stream setup
  bundle-tools: 1123ms
  session-resource-loader: 1120ms
  total: ~27 seconds PREP TIME before model even starts

After prep, the dispatch completes at:

feishu[default][msg:...]: dispatch complete (replies=1, elapsed=46554ms)

Additionally, liveness warnings show severe event loop delays:

liveness warning: eventLoopDelayMaxMs=13866.4 eventLoopUtilization=0.7 active=1 queued=1

Expected behavior

Agent response should complete in 3-5 seconds for simple queries. The startup pipeline (plugin tools loading, system prompt assembly, stream setup) should be cached between runs within the same session.

Environment

  • OpenClaw: v2026.4.29
  • Channel: Feishu/Lark (openclaw-lark plugin)
  • OS: Ubuntu 24.04, x86, SATA SSD (970MB/s seq read)
  • RAM: 14GB (11GB available, not memory constrained)
  • CPU: Mostly idle (85%+ idle during delay)
  • Node: v24.14.0

Related issues

Root cause analysis

The core-plugin-tools stage rebuilds plugin tool definitions on every single message, despite the same session, same agent, same configuration. There is no caching layer for tool schemas, plugin tool registrations, or system prompt assembly.

Deleting unused workspace skills (from 53 to 21) had zero impact on load time, confirming the bottleneck is in OpenClaw core plugin tool infrastructure, not user-installed skills.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions