Skip to content

feat(system-agent): host memory import in Ask OpenClaw - #115376

Merged
steipete merged 8 commits into
mainfrom
steipete/custodian-memory-import-wizard
Jul 28, 2026
Merged

steipete merged 8 commits into
mainfrom
steipete/custodian-memory-import-wizard

Conversation

@steipete

@steipete steipete commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Importing memories from other local agent homes was an onboarding-only step (plus the Control UI Memory page); Ask OpenClaw — the talk-to-configure surface — could not do it, so "import my memories" required leaving the chat.

Why This Change Was Made

Adds import memory as a hosted in-chat flow wrapping the real onboarding step (runSetupMemoryImportStep). Memory import copies files rather than writing config, so it deliberately bypasses the config-wizard write path and uses the wizard bridge directly with its own safety rails: the workspace precondition is checked before any provider code loads; before EVERY provider apply the host rechecks inference authority AND compares the config-file hash against wizard start (strict whole-hash drift guard mirroring the config wizards' "configuration changed during setup" semantics, so a concurrent default-agent/workspace change can never redirect copies); the flow now returns typed per-provider outcomes so summaries are honest ("Imported N items from X", "Nothing to import", per-provider failures, and — when an apply throws mid-copy — "failed partway, some files may have been copied" instead of falsely claiming nothing was copied); completions and indeterminate partial failures append a memory.import audit entry with per-provider detail; no config write occurs so post-write config validation is intentionally skipped. Onboarding's terminal behavior is unchanged (the hooks are optional and absent there).

User Impact

"Import memory" now works as a conversation in Settings > Ask OpenClaw (and its dock) on both surfaces: guided provider selection with option cards, honest outcome and failure reporting, full audit-trail integration, and a clean "finish onboarding first" refusal when no workspace exists.

Evidence

  • Focused tests: chat-engine 88 (hosted flow + audit + summaries, copy-boundary authority recheck, config-drift abort, workspace-missing refusal, indeterminate partial-copy reporting, audit-failure tolerance), memory-import wizard 9 + flow 15 (typed outcomes, onboarding parity), tool 15, prompts/parser suites green.
  • Post-rebase focused proof: node scripts/run-vitest.mjs src/system-agent/chat-engine.test.ts src/system-agent/operations-setup-flows.test.ts passed 97 tests on current origin/main; git diff --check origin/main...HEAD passed.
  • Autoreview (Codex gpt-5.6-sol, high): earlier review found stale-workspace drift and partial-copy reporting defects; both were fixed. The current-base review is clean, "patch is correct (0.87)".
  • Exact-head CI: run 30394712358 on 01b27669dc3def9a10fd26770b2cb32361acb7bc succeeded on attempt 2 after one unrelated server-startup-log timeout rerun.

@steipete steipete self-assigned this Jul 28, 2026
@steipete
steipete marked this pull request as ready for review July 28, 2026 18:45
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: L maintainer Maintainer-authored PR commands Command implementations size: XL and removed size: L labels Jul 28, 2026
@steipete
steipete force-pushed the steipete/custodian-memory-import-wizard branch from 7a614e4 to c7baa8b Compare July 28, 2026 19:25
@steipete
steipete force-pushed the steipete/custodian-memory-import-wizard branch from a2a6a3c to 01b2766 Compare July 28, 2026 20:04
@steipete
steipete merged commit 9e5e6f9 into main Jul 28, 2026
198 of 200 checks passed
@steipete
steipete deleted the steipete/custodian-memory-import-wizard branch July 28, 2026 20:27
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 28, 2026
…etwork-none

* origin/main: (74 commits)
  fix(ui): make Control UI ownership and permissions reliable (#115364)
  feat(system-agent): host memory import in Ask OpenClaw (#115376)
  fix(chat): preserve literal Markdown image examples (#113904)
  refactor(chat): keep web and terminal sessions synchronized (#115377)
  fix(ui): order model picker by provider strength (#115380)
  feat(ui): make Memory settings a destination page with live overview and dreams (#115383)
  docs(security): fix warning line wrap (#115388)
  fix(memory-core): avoid cubic MMR similarity rescans (#113359)
  fix(discord): preserve code-leading reasoning chunks (#103166)
  fix(slack): protect outbound hooks from previews
  fix(ui): keep explicit navigation ahead of chat canonicalization (#115366)
  fix(exec): safely cancel pending node approvals (#115373)
  fix: make Code Mode reliable across gateway and provider lifecycles (#115379)
  perf(ui): debounce event-driven session list refreshes and right-size child paging (#115374)
  feat(talk): support GPT-Live realtime voice over ChatGPT OAuth (#115226)
  feat(system-agent): guide gateway configuration in Ask OpenClaw (#115363)
  fix(agents): make overflow recovery append-only via branch-and-reappend (#115271) (#115310)
  fix(macos): bound websocket ping so a dropped pong cannot orphan its continuation (#115362)
  fix(codex): isolate native hook relay startup (#115078)
  fix(ci): stop reviving superseded pull request workflows (#115378)
  ...

# Conflicts:
#	CHANGELOG.md
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 29, 2026
* feat(wizard): expose memory import outcomes

* feat(system-agent): host memory import in chat

* test(system-agent): trip the copy-boundary recheck inside the wizard run

* fix(system-agent): guard memory import against drift and partial-copy lies

* fix(wizard): return typed memory import outcomes in callers

* test(onboard): split guided memory-import coverage

* fix(system-agent): use effective config for memory import

* test(onboard): type memory import detection mock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations maintainer Maintainer-authored PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant