[Bug] 远程工作区(SSH/WSL/Docker)下后台记忆提取/整合被禁用,会话不会主动整理记忆
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
提交前确认 · Pre-submission checklist
- 我已搜索过现有 issue,确认这不是重复 / I searched existing issues and confirmed this isn't a duplicate.
- 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.
问题类别 · Category
对话 / Agent 交互 · Agent chat
涉及的 Agent 框架 · Agent framework
ZCode Agent(自研)
严重程度 · Severity
影响体验 · Major (功能可用但体验受损 / works but degraded)
复现频率 · Reproducibility
必现 · Always
问题描述 · Description
远程工作区(ssh / wsl / docker / server,ZCODE_SERVICE_AUTHORITY_MODE=desktop-attached-remote)下,ZCode 不会主动整理记忆:对话中值得保存的信息不会被自动提取写入项目记忆目录,后台记忆整合(background memory consolidation)也不触发。但记忆读取侧正常(MEMORY.md 会注入上下文、语义召回可用),被禁用的只有"主动提取/整理"。
代码定位:agent bundle(zcode.cjs)中记忆提取调度器入口 project_memory_extract 有一道显式 gate,远程工作区直接 return:
if (e.shuttingDown || e.config.memory?.extractionEnabled === false) return;
let r = resolveEnabledProjectMemoryRoot(...);
if (!r || e.isRemoteWorkspace() || !e.sessionStore || !e.fileSystemPort || !e.modelAdapter) return; // ← 远程跳过
isRemoteWorkspace() 对 workspace 标识以 remote: 开头返回 true(覆盖 ssh/wsl/docker/server 四种)。
如果这是有意设计(例如远程模式下避免后台模型调用/不可信目录写入),希望能提供开关或文档说明;否则希望远程模式与本地行为一致。
复现步骤 · Steps to reproduce
- 通过 SSH / WSL / Docker 打开远程工作区(或运行在 desktop-attached-remote 模式,如 Windows 主机 + WSL2)
- 在对话中提供值得保存的信息(项目决策、用户偏好等),但不显式要求"记住"
- 完成若干轮对话后查看
~/.zcode/cli/memories/projects/<project>/memory/ - 观察:无任何自动新增的记忆(除非用户显式说"记住这个",此时直接 Write 仍有效)
期望表现 · Expected behavior
与本地工作区一致:对话结束后自动评估是否有值得提取的记忆,后台记忆整合正常触发。
实际表现 · Actual behavior
远程工作区下后台记忆提取/整合从不触发,记忆目录保持为空;仅显式要求"记住"时才会写入。
ZCode 版本 · ZCode version
3.7.6
设备 / 系统 / 浏览器 · Device / OS / Browser
Windows 主机 + WSL2(ZCODE_SERVICE_AUTHORITY_MODE=desktop-attached-remote),Linux 6.18 (WSL2)
截图 / 录屏 / 日志 · Screenshots / Recordings / Logs
关联问题(同属远程模式功能降级):#73(WSL 远程子 agent 被降级为只读 Explore)、#77(远程无法使用插件 / MCP 同步)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the agent bundle zcode.cjs at the project_memory_extract scheduler and inspect the isRemoteWorkspace gate, including the remote workspace identifiers described in the issue. Reproduce with desktop-attached-remote using SSH, WSL, or Docker and observe extraction and consolidation. Done means remote behavior matches local behavior, or the supported limitation has a documented or configurable explanation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, javascript
- Domain
- ai, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100