openclaw - 💡(How to fix) Fix [UI] 启动时 skills 过度加载导致对话上下文被压缩,聊天失去记忆 [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#70725Fetched 2026-04-24 05:54:21
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants
RAW_BUFFERClick to expand / collapse

Problem

OpenClaw 启动后,UI 在加载大量 skills 时会显示警告文字。过度加载导致的后果:

  1. 对话上下文被压缩 — 系统频繁触发 context overflow,聊天历史被截断丢失
  2. 长期记忆失效 — 用户反映聊着聊着就"失忆"了,之前的内容记不住
  3. UI 响应变慢 — skills 越多,loader 压力越大

根本原因:OpenClaw 默认加载 所有 已安装的 skills,不管当前会话是否需要。

Proposed Solution

参考 browser.entries 的 whitelist 模式,为 skills 添加类似的机制:

```yaml skills: mode: whitelist # "all" | "whitelist" entries: github: { enabled: true } weather: { enabled: true } gh-issues: { enabled: true } ```

行为:

  • mode: all(默认)— 保持现有行为,加载所有 skills
  • mode: whitelist — 仅加载 entries 中显式声明且 enabled: true 的 skills
  • 未声明的 skills 在启动时被忽略,运行时的 skill matching 也不会命中

额外收益:

  • 启动速度提升(不扫描全部 skill 目录)
  • 内存占用降低(只缓存白名单内的 skill 元数据)
  • LLM 不再误匹配不相关的 skills
  • 用户从 SkillHub 安装新 skill 不影响现有工作流

Alternatives Considered

  • Implicit Whitelist(简化版): 如果 entries 非空,则自动切换为 whitelist 模式,无需 mode 字段
  • per-session skill filter: 在会话级别动态启用/禁用 skills,但会增加架构复杂度

User Impact

所有安装了大量 skills 的用户都会受益,尤其是:

  • 从 SkillHub 安装了很多 skill 的用户
  • 想要稳定长对话、不希望上下文被压缩的用户

extent analysis

TL;DR

Implement a whitelist mode for skills to load only necessary skills and reduce the load on the system.

Guidance

  • To mitigate the issue, consider adding a mode field to the skills configuration and setting it to whitelist, then explicitly enable only the required skills in the entries section.
  • Verify that the whitelist mode is working correctly by checking that only the specified skills are loaded and that the UI is no longer slow or displaying warning texts.
  • To further optimize, review the skills installed from SkillHub and remove any unnecessary ones to reduce the overall load on the system.
  • Consider testing the implicit whitelist approach as an alternative solution, where the mode automatically switches to whitelist if the entries section is not empty.

Example

skills:
  mode: whitelist
  entries:
    github: { enabled: true }
    weather: { enabled: true }
    gh-issues: { enabled: true }

Notes

The proposed solution assumes that the skills configuration is in a YAML file and that the mode and entries fields are supported. The implicit whitelist approach may be a simpler alternative, but its effectiveness depends on the specific use case.

Recommendation

Apply the workaround by implementing the whitelist mode for skills, as it provides a more controlled and efficient way to manage skills and reduce the load on the system.

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