背景 链接到标题
本地部署的 OpenClaw 实例开启了 memory-core 的 Dreaming(记忆巩固系统),每天凌晨 3:00 自动整理短期记忆并写入 DREAMS.md。但生成内容全部为英文,即使整站使用场景完全是中文。
现象 链接到标题
DREAMS.md 中的 Dream Diary 条目:
*June 17, 2026 at 3:00 AM UTC*
The system processed 12 memory fragments and identified 3 recurring patterns...
而非预期的中文输出。
根因 链接到标题
Dreaming 的 Dream Diary 子 agent system prompt 在 OpenClaw 源码中是硬编码的英文,无任何语言/区域设置接口。
配置中 Dreaming 仅启用:
{
"plugins": {
"entries": {
"memory-core": {
"config": {
"dreaming": {
"enabled": true
}
}
}
}
}
}
dreaming 下可用的用户配置项只有 enabled、frequency、model(见 Memory config),没有 language 或 prompt 等控制输出语言的选项。
相关 PR 链接到标题
社区已有一个完整的解决方案:PR #79228 — feat(memory-core): customize Dream Diary prompt
该 PR 由 TurboTheTurtle 提交,新增两个配置项:
| 配置项 | 类型 | 说明 |
|---|---|---|
dreaming.language |
string |
语言/区域提示,如 "zh-CN" |
dreaming.diaryPrompt |
string |
完整自定义 prompt 覆盖,优先级高于 language |
使用示例:
{
"plugins": {
"entries": {
"memory-core": {
"config": {
"dreaming": {
"enabled": true,
"language": "zh-CN"
}
}
}
}
}
}
或直接指定 prompt:
{
"plugins": {
"entries": {
"memory-core": {
"config": {
"dreaming": {
"enabled": true,
"diaryPrompt": "用中文写一段简短的梦境日记,不超过三段。"
}
}
}
}
}
}
PR 包含了完整的实机验证:配置 language = "zh-CN" 后 DREAMS.md 正确输出中文条目。
现状 链接到标题
该 PR 于 2026-05-18 被作者关闭,未合入 main 分支。原因是缺乏 maintainer 产品/API 批准——maintainer 未最终决定 diaryPrompt 完全覆盖内置 prompt 是否是可接受的稳定 API 契约,还是应该只做语言提示或追加式自定义指令。
当前部署版本为 2026.6.6,最新正式版 2026.6.8(2026-06-16 发布)的 changelog 中也未包含此功能。
相关 issue:
- Feature request: configurable Dream Diary language / prompt #79223 — 该 PR 关闭的原始需求,仍为 Open 状态
- Feature Request: Allow customizing dreaming diary language #77830 — 类似需求,已 Closed(被 #79223 替代)
- Feature: Add language/locale config for Dreaming narrative generation #65097 — 更早期的同类需求,已 Closed
- Feature Request: Make Dreaming System Prompt User-Customizable #69533 — 同上
四个 issue 最终全部指向 #79223,而 #79223 的 PR #79228 未合入。
影响 链接到标题
- 非英文用户/工作区的
DREAMS.md内容语言不可控 - 与主动记忆、飞书对话等中文交互场景割裂
- 虽有临时方案(如手动翻译或 post-processing),但均非优雅解决
当前方案 链接到标题
等待上游 maintainer 批准该 PR 或推出替代方案。无侵入性临时方案。