Add sessionless workspace memory forget and dream#6227
Conversation
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
|
Thanks for the PR! Template looks good ✓ On direction: this is a natural continuation of PR #5884 — extending the sessionless workspace memory task lane to cover forget and dream, so clients don't need to fork a session just to manage auto-memory. Aligned with the daemon architecture evolution. No CHANGELOG reference needed; this is internal API surface that builds on the recently-merged remember path. On approach: the scope feels right. You generalized the existing One concern worth addressing: in Moving on to code review and testing. 🔍 中文说明感谢贡献! 模板完整 ✓ 方向:这是 PR #5884 的自然延续——将 sessionless workspace memory task lane 扩展到 forget 和 dream,客户端无需 fork session 即可管理 auto-memory。与 daemon 架构演进方向一致。CHANGELOG 无需引用;这是在最近合并的 remember 路径上构建的内部 API。 方案:范围合理。将现有 一个值得关注的点:在 进入代码审查和测试 🔍 — Qwen Code · qwen3.7-max |
|
Checked this concern. The handler is intentionally sitting at the core -> bridge boundary here: core So |
Stage 2: Code Review + TestingCode Review FindingsApproach: Clean generalization. The PR extends the existing Corrections from Stage 1:
Observations (non-blocking):
No blocking issues found. Testing Results
Integration test confirms Before / After (TUI)N/A — daemon API changes with no TUI surface. 中文说明第二阶段:代码审查 + 测试代码审查发现方法:干净的一般化。 PR 将现有的 第一阶段的纠正:
观察(非阻塞):
未发现阻塞性问题。 测试结果
前后对比(TUI)不适用 — 守护进程 API 变更,无 TUI 界面。 --- Qwen Code |
Stage 3: Reflection + VerdictReflectionThis PR is a well-scoped extension of the sessionless workspace memory pattern established in PR #5884. The author correctly identified that forget and dream operations share the same task-lane serialization needs as remember, and generalized the lane rather than duplicating it. The discriminated union on The abort signal threading added to One Stage 1 concern (systemMessage field access) was verified as a false positive after reading the actual type definitions — corrected in Stage 2. Triage confidence: High. All 1,668 tests pass (unit + integration), build/typecheck/bundle clean, code review found no blocking issues. Verdict: Approve ✅
中文说明第三阶段:反思 + 裁定反思本 PR 是 PR #5884 建立的无会话工作区记忆模式的合理扩展。作者正确识别到 forget 和 dream 操作与 remember 共享相同的任务通道序列化需求,并选择了一般化而非重复实现。基于
审查置信度: 高。全部 1,668 项测试通过(单元 + 集成),构建/类型检查/打包均无错误,代码审查未发现阻塞性问题。 裁定: 批准 ✅
--- Qwen Code |
|
@qwen-code /review |
wenshao
left a comment
There was a problem hiding this comment.
Findings not anchored to a diff line
packages/cli/src/serve/workspace-remember-errors.ts:33 — extractRememberErrorCode falls back to the hardcoded string 'remember_failed' and is reused for forget and dream tasks. When a forget/dream task fails with an unclassified error, polling clients see error.code === 'remember_failed', misdirecting oncall to the wrong subsystem. Generalize to \${kind}_failed`or wrap the call atworkspace-remember.ts` enqueue-forget/enqueue-dream catch sites.
packages/cli/src/serve/workspace-remember.ts:23 — WorkspaceMemoryRememberTaskStatus still says "Remember" but is now the status type for all three task kinds via WorkspaceMemoryTaskBaseSnapshot. The SDK side already renamed to DaemonWorkspaceMemoryTaskStatus; the server-side name should follow (keep WorkspaceMemoryRememberTaskStatus as a @deprecated alias if backwards compatibility matters).
— qwen3.7-max via Qwen Code /review
|
Addressed the latest requested changes through d175f6c:
Verification on this head:
@qwen-code /review |
|
@wenshao I addressed the six latest review threads in a0b5c85 and re-requested review to clear the stale CHANGES_REQUESTED state. Changes in this follow-up:
Local verification on this head:
Current state from gh: all review threads are resolved, PR is mergeable, auto-merge remains enabled. GitHub ubuntu CI is still pending on the new head. |
…ory-forget-dream # Conflicts: # packages/sdk-typescript/scripts/build.js
|
Merged latest main into this branch in 26f11f9 without force-push and resolved the SDK daemon browser bundle budget conflict by setting the combined session artifacts + sessionless memory surface budget to 136KB. Verification after the merge:
Current state from gh: mergeable, auto-merge enabled, zero unresolved review threads, review re-requested from @wenshao to clear the stale CHANGES_REQUESTED decision. |
|
@qwen-code /triage |
Stage 1: Gate (3rd pass)Template looks good ✓ — all required headings present. Direction: Aligned. This is the natural completion of the sessionless workspace memory task lane from PR #5884. Remember was already sessionless; forget and dream are workspace-scoped operations that share the same serialization and polling needs. Moving them to the same lane is the right call — it eliminates the Scope: Clean. The prior concern about mobile-mcp formatting noise has been addressed (removed in On approach: The discriminated union on Moving on to code review. 🔍 中文说明第一阶段:准入(第三次审查)模板完整 ✓ 方向: 合理。这是 PR #5884 无会话工作区记忆任务通道的自然完成。remember 已经是无会话的;forget 和 dream 是共享相同序列化和轮询需求的 workspace 级别操作,将它们迁移到同一通道是正确的选择。 范围: 干净。之前关于 mobile-mcp 格式化噪音的问题已解决。剩余 39 个文件均与本功能直接相关。 方案: 基于 进入代码审查 🔍 — Qwen Code · qwen3.7-max |
Stage 2: Code Review + Testing (3rd pass)Code ReviewIndependent proposal: Extend Comparison with PR: Matches closely. The discriminated union on No blocking issues found. Key observations:
Testing Results
Before / After (TUI)N/A — daemon API changes with no TUI surface. Endpoints are exercised via HTTP polling, not terminal UI. 中文说明第二阶段:代码审查 + 测试(第三次审查)代码审查独立方案: 扩展 与 PR 对比: 高度一致。基于 未发现阻塞性问题。 测试结果
前后对比(TUI)不适用 — 守护进程 API 变更,无 TUI 界面。 — Qwen Code · qwen3.7-max |
Stage 3: Reflection + Verdict (3rd pass)ReflectionThis PR completes the sessionless workspace memory task lane started in PR #5884. The author correctly generalized the The implementation is straightforward and follows established patterns. The abort signal threading in The prior mobile-mcp formatting noise has been removed. The diff is now focused on the feature. Maintainer (@wenshao) has already approved after multiple rounds of review. Triage confidence: High. The implementation is clean, well-tested (669 tests across 4 packages, all passing), type-safe, and follows established patterns from PR #5884. Verdict: Approve ✅
中文说明第三阶段:反思 + 裁定(第三次审查)反思本 PR 完成了 PR #5884 开始的无会话工作区记忆任务通道。作者正确地将 实现直接且遵循既有模式。 之前的 mobile-mcp 格式化噪音已移除。diff 现在聚焦于功能本身。维护者已在多轮审查后批准。 审查置信度: 高。实现干净、测试充分(4 个包 669 项测试全部通过)、类型安全、遵循 PR #5884 的既有模式。 裁定: 批准 ✅
— Qwen Code · qwen3.7-max |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅
|
Addressed the latest triage scope note in 4ccbcdb by removing the unrelated packages/mobile-mcp formatting noise from this PR. The PR diff now has no packages/mobile-mcp files. Verification on latest head 4ccbcdb:
Current state from gh: mergeable, auto-merge enabled, zero unresolved review threads, still waiting on @wenshao re-review to clear the stale CHANGES_REQUESTED decision. @qwen-code /triage |
✅ Maintainer verification — real local E2E (sessionless memory forget & dream)Built this PR at HEAD How it was tested (no daemon / bridge / child mocks)
Results — 17/17
The sessionless claim is the headline, and I verified the signal is non‑vacuous: Supporting evidence (this branch)
Scope & disclosures (for transparency)
🧹 Non‑blocking housekeepingThe diff currently carries 14 unrelated Env: macOS (Darwin 25.5.0) · Node v22.22.2 · PR HEAD 🇨🇳 中文版(完整对应)✅ 维护者验证 —— 本地真实 E2E(sessionless memory forget & dream)在 HEAD 如何验证(daemon / bridge / 子进程均不 mock)
结果 —— 17/17
(截图见上方英文版) sessionless 是核心卖点,我特意验证了这个信号不是"永远为 0"的空判断:一旦真正创建一个 session, 佐证(本分支)
范围与说明(保持透明)
🧹 不阻塞的清理建议当前 diff 夹带了 14 个无关的 环境:macOS(Darwin 25.5.0)· Node v22.22.2 · PR HEAD |
|
@qwen-code /triage |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅

What this PR does
Adds sessionless managed-memory forget and dream daemon APIs so workspace-bound clients can run both operations without going through a live session fork. The new endpoints queue hidden workspace memory tasks, expose pollable task status, publish managed memory change events only when managed topics actually changed, and surface matching TypeScript SDK helpers and ACP route mappings.
It also lets the hidden dream path record normal dream metadata while suppressing chat transcript recording, matching the intent of hidden workspace memory operations.
Why it's needed
PR #5884 moved the workspace memory remember action onto a sessionless path, but forget and dream were still forced through the current session flow. These operations are workspace-scoped and can be served by the same bound daemon workspace lane, so clients no longer need to depend on
/session/:id/forkjust to forget or consolidate managed auto-memory.Reviewer Test Plan
How to verify
Start
qwen servewith managed memory available. CallPOST /workspace/memory/forgetwith a non-emptyquery, pollGET /workspace/memory/forget/:taskId, and confirm the task completes with removed entries or a no-op result without creating or requiring a session. CallPOST /workspace/memory/dream, pollGET /workspace/memory/dream/:taskId, and confirm dream completion returns touched topics and deduped entry count. For ACP-over-HTTP clients, confirm the matching_qwen/workspace/memory/forgetand_qwen/workspace/memory/dreammethods return the same task shapes.Evidence (Before & After)
N/A for screenshots. Local verification passed: core dream tests, ACP bridge tests, CLI workspace memory routes, ACP child handling, ACP-over-HTTP transport, server capabilities, SDK client/route/public surface tests,
npm run build,npm run typecheck,npm run bundle, and integration-tests serve route coverage.Tested on
Environment (optional)
Node.js v22.17.0 in a local worktree.
Risk & Scope
Linked Issues
References #5884.
中文说明
What this PR does
新增 sessionless 的 managed-memory forget 和 dream daemon API,让绑定 workspace 的客户端不需要经过活跃 session fork 就能执行这两个操作。新的接口会排入隐藏 workspace memory task 队列,提供可轮询的任务状态,只在 managed topic 实际变化时发布 memory change 事件,并补齐 TypeScript SDK helper 与 ACP route mapping。
同时,隐藏 dream 路径会正常记录 dream metadata,但不会写入聊天 transcript,和隐藏 workspace memory 操作的预期保持一致。
Why it's needed
PR #5884 已经把 workspace memory remember 迁到 sessionless 路径,但 forget 和 dream 仍然被迫走当前 session flow。这两个操作本质是 workspace-scoped,可以复用绑定 daemon workspace 的同一条任务 lane,因此客户端不再需要为了遗忘或整理 managed auto-memory 而依赖
/session/:id/fork。Reviewer Test Plan
How to verify
在 managed memory 可用时启动
qwen serve。调用POST /workspace/memory/forget并传入非空query,轮询GET /workspace/memory/forget/:taskId,确认任务无需创建或依赖 session 即可完成,并返回删除条目或 no-op 结果。调用POST /workspace/memory/dream,轮询GET /workspace/memory/dream/:taskId,确认 dream 完成后返回 touched topics 和 deduped entry count。对于 ACP-over-HTTP 客户端,确认对应的_qwen/workspace/memory/forget和_qwen/workspace/memory/dream方法返回相同 task shape。Evidence (Before & After)
截图不适用。本地验证已通过:core dream tests、ACP bridge tests、CLI workspace memory routes、ACP child handling、ACP-over-HTTP transport、server capabilities、SDK client/route/public surface tests、
npm run build、npm run typecheck、npm run bundle,以及 integration-tests 的 serve route 覆盖。Tested on
Environment (optional)
Node.js v22.17.0,本地 worktree。
Risk & Scope
Linked Issues
References #5884.