Skip to content

feat: let agents remember across private conversations - #100140

Merged
steipete merged 7 commits into
openclaw:mainfrom
davemorin:feat/remember-across-conversations
Jul 18, 2026
Merged

steipete merged 7 commits into
openclaw:mainfrom
davemorin:feat/remember-across-conversations

Conversation

@davemorin

@davemorin davemorin commented Jul 5, 2026 •

Copy link
Copy Markdown
Member

Closes #99611

What Problem This Solves

Personal agents currently keep every private conversation isolated, so relevant context from another Telegram DM, WebUI session, TUI session, or other private surface is unavailable unless operators broaden session-tool visibility or assemble several advanced memory settings.

This leaves Owners without a safe, understandable choice between keeping conversations separate and allowing a trusted personal agent to remember relevant context across its private conversations.

Why This Change Was Made

This adds a default-off, per-agent memorySearch.rememberAcrossConversations setting. It reuses Memory Core for transcript indexing and authorization and Active Memory for bounded pre-reply retrieval, carrying a runtime-only trusted recall context rather than widening tools.sessions.visibility or merging transcripts.

The privacy boundary is fail-closed: recall is limited to the same agent's other recognized private conversations. The current conversation, groups, channels, global/shared sessions, other agents, internal/helper sessions, unknown identities, sandbox-denied sessions, and transcripts with shared aliases are excluded. Ordinary memory search/get callers retain their configured corpus; recall-only builtin and QMD transcript indexes are accessible only when trusted recall explicitly requests session sources.

User Impact

Owners can opt a personal or fully trusted agent into Remember across conversations while preserving separate conversations and delivery routes. Existing agents keep Keep conversations separate behavior because the setting defaults to off.

Shared workspace Markdown memory is unchanged. Group and channel conversations remain isolated in both directions. /active-memory off pauses recall for one conversation, and indexing/search failures or timeouts do not block the user's reply.

Evidence

  • pnpm test <15 affected test files> -- --reporter=dot — 906/906 passed across config, agent plumbing, Memory Core, Active Memory, QMD, doctor, Plugin SDK, and QA Lab suites.
  • Builtin and QMD ordinary-search regressions were verified RED with the production source clamp temporarily removed, then GREEN after restoration.
  • pnpm openclaw qa suite --provider-mode mock-openai --scenario remember-across-conversations --output-dir .artifacts/qa-e2e/remember-pr-final — 1/1 passed against a real Gateway child and qa-channel transport. The scenario proves positive private-to-private recall plus group/anchor exclusion, setting-off behavior, per-conversation pause, fresh-conversation independence, and unchanged tools.sessions.visibility.
  • pnpm build — passed.
  • pnpm config:docs:check — passed.
  • pnpm plugin-sdk:api:check — passed.
  • Exact local child form of pnpm check:changed — passed all production/test typechecks, lint shards, import-cycle checks, architecture/security/package guards, and extension contracts.
  • git diff --check origin/main...HEAD — passed.
  • Final Codex autoreview — no findings; patch correct (0.88).

Live openai/gpt-5.4 --fast acceptance was not run locally because no approved API credential was available. The deterministic mock-provider scenario covers the complete Gateway/channel/privacy flow without provider variance.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: memory-core Extension: memory-core commands Command implementations agents Agent runtime and tooling extensions: qa-lab size: XL maintainer Maintainer-authored PR labels Jul 5, 2026
@clawsweeper

clawsweeper Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed July 18, 2026, 3:11 AM ET / 07:11 UTC.

Summary
Adds a default-off per-agent memorySearch.rememberAcrossConversations setting that performs bounded same-agent recall across recognized private conversations through Active Memory and Memory Core.

PR surface: Source +593, Tests +2186, Docs +146, Generated 0, Other +526. Total +3451 across 56 files.

Reproducibility: yes. for the review finding: enable the setting and include an id-less entry in agents.list; the new doctor helper calls agent.id.trim() without a guard. The broader feature is not an existing-bug reproduction because it introduces a new capability.

Review metrics: 2 noteworthy metrics.

  • New configuration surface: 1 per-agent boolean added. memorySearch.rememberAcrossConversations is default-off but changes transcript indexing and retrieval behavior when enabled.
  • New trusted runtime context: 1 plugin tool-context field added. conversationRecall crosses the embedded-run and plugin-tool construction boundary, so its privacy contract needs focused review.

Stored data model
Persistent data-model change detected: migration/backfill/repair: docs/plugins/memory-lancedb.md, migration/backfill/repair: src/commands/doctor-memory-search.test.ts, migration/backfill/repair: src/commands/doctor-memory-search.ts, serialized state: extensions/active-memory/session-policy.ts, serialized state: extensions/memory-core/src/session-search-visibility.cross-agent.test.ts, serialized state: extensions/memory-core/src/session-search-visibility.qmd.test.ts, and 34 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #99611
Summary: This PR is the active candidate implementation for the canonical personal-agent private-conversation recall feature request; the related transcript-visibility reports overlap only at supporting infrastructure.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🌊 off-meta tidepool
Patch quality: 🦐 gold shrimp
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Guard optional agent IDs in the doctor helper and add the focused regression test.
  • Re-run the targeted doctor and private-recall scenario against the repaired head.

Mantis proof suggestion
A redacted Telegram Desktop proof would materially demonstrate the intended private-to-private recall boundary and the exclusion of group conversations. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis telegram desktop proof: verify private-to-private recall succeeds while a group message neither receives nor supplies recalled context.

Risk before merge

  • [P1] Merging before the doctor guard is fixed makes openclaw doctor crash for an otherwise valid configuration that includes an id-less agent entry while cross-conversation recall is enabled.
  • [P1] This adds one opt-in transcript-recall authorization path and one plugin-tool context field; maintainers should retain the compatibility, session-state, and security-boundary review labels until the repaired head has focused upgrade and privacy-boundary validation.

Maintainer options:

  1. Repair the doctor lookup before merge (recommended)
    Use the same optional-ID guard for the default-agent lookup and add a focused regression test, then re-run the doctor and private-recall validation.
  2. Pause for feature-owner review
    Keep the branch open if the intended treatment of id-less agent entries or the persisted recall-indexing upgrade path needs a broader owner decision.

Next step before merge

  • [P2] The PR is member-authored and carries the protected maintainer label; its remaining repair is concrete, but feature owners should direct the next branch update and validation.

Security
Cleared: No separate concrete security or supply-chain defect was found in the reviewed diff, although the new transcript-recall authorization boundary remains merge-sensitive.

Review findings

  • [P2] Guard the default-agent lookup against missing IDs — src/commands/doctor-memory-search.ts:461
Review details

Best possible solution:

Guard every agents.list ID access in the doctor helper, add a regression case with an id-less entry, then revalidate default-off behavior and same-agent-private recall before landing this bounded feature.

Do we have a high-confidence way to reproduce the issue?

Yes, for the review finding: enable the setting and include an id-less entry in agents.list; the new doctor helper calls agent.id.trim() without a guard. The broader feature is not an existing-bug reproduction because it introduces a new capability.

Is this the best way to solve the issue?

No, not yet: reusing Active Memory and Memory Core is the appropriate owner boundary, but the doctor helper must consistently handle optional agent IDs before this is safe to merge.

Full review comments:

  • [P2] Guard the default-agent lookup against missing IDs — src/commands/doctor-memory-search.ts:461
    The new filter correctly excludes id-less entries before building enabledAgentIds, but defaultEntry immediately calls agent.id.trim() without the same guard. A valid id-less entry therefore makes openclaw doctor throw whenever this recall diagnostic runs; guard the lookup and retain a regression test. This is the previously reported blocker, still present on the latest head.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.93

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against cad4e395d21f.

Label changes

Label changes:

  • remove proof: sufficient: Current real behavior proof status is not_applicable, not sufficient.

Label justifications:

  • P2: This is a useful opt-in feature with a bounded but real failure mode in the new doctor path.
  • merge-risk: 🚨 compatibility: The new per-agent setting changes memory indexing and retrieval behavior across existing configuration and provider combinations.
  • merge-risk: 🚨 session-state: The feature indexes and retrieves session transcripts across separate conversations while preserving their isolation.
  • merge-risk: 🚨 security-boundary: A trusted same-agent-private authorization context is propagated into plugin tool construction and must remain fail-closed.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The PR author is a repository member; supplied QA and focused test evidence remains useful supplemental proof, but the external-contributor real-behavior gate does not apply.
  • mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. The feature changes visible private-conversation behavior on Telegram and a short Telegram Desktop recording can demonstrate recall without group leakage.
Evidence reviewed

PR surface:

Source +593, Tests +2186, Docs +146, Generated 0, Other +526. Total +3451 across 56 files.

View PR surface stats
Area Files Added Removed Net
Source 34 697 104 +593
Tests 15 2581 395 +2186
Docs 5 223 77 +146
Config 0 0 0 0
Generated 1 4 4 0
Other 1 526 0 +526
Total 56 4031 580 +3451

What I checked:

  • Current feature remains absent from main: The PR adds the new rememberAcrossConversations configuration field, its schema/help metadata, and the runtime propagation path; the base revision does not contain this feature surface, so current main does not already solve the requested capability. (src/config/types.tools.ts:438, ae9c6ea124d4)
  • Doctor lookup still dereferences an optional ID: The new helper filters id-less entries while building enabled IDs, but immediately follows with configuredAgents.find((agent) => agent.id.trim() ...). An id-less agents.list entry therefore throws while doctor evaluates this setting. (src/commands/doctor-memory-search.ts:461, ae9c6ea124d4)
  • Prior blocker remains relevant: The prior completed review cycle identified optional agent IDs in the same doctor path; the latest repair updated surrounding filtering but did not make the subsequent default-agent lookup safe. (src/commands/doctor-memory-search.ts:461, 8affa607ce5f)
  • Feature-history routing: The original implementation commit is attributed to davemorin, while subsequent rebases and repair commits in the PR history are attributed to steipete; vincentkoc also supplied the earlier maintainer-owned integration and validation updates. (extensions/active-memory/index.ts:119, ae9c6ea124d4)
  • Linked feature remains canonical: The PR body explicitly declares the open feature request as its closing target, so that issue remains open until this implementation is landed or replaced. (e67c81c3078f)

Likely related people:

  • steipete: Authored the current repair and rebase commits that shape the Active Memory, Memory Core, and doctor integration on this branch. (role: recent area contributor; confidence: high; commits: 8dce9517fdc4, ac67674d4710, ae9c6ea124d4; files: extensions/active-memory/index.ts, extensions/memory-core/src/session-search-visibility.ts, src/commands/doctor-memory-search.ts)
  • vincentkoc: Was assigned the PR and documented earlier maintainer fixes for live configuration, provider boundaries, doctor diagnostics, and the private-recall proof surface. (role: feature integration contributor; confidence: high; commits: 50dcc571586b, 5c205f99c41c; files: extensions/active-memory/index.ts, src/commands/doctor-memory-search.ts, extensions/memory-core/src/session-search-visibility.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (13 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-06T03:02:48.823Z sha 9b81709d055825c56efaaaee230a4b99c7f41476 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-07T04:00:09.919Z sha 50dcc571586bd0b8395de09d83c15c64f1e71e84 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-07T05:25:49.672Z sha 78842947b88e0735c99b58eb32b17ceba2f0cde4 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-07T05:45:32.607Z sha 5c205f99c41c791251c2218b65d059e01f52bedd :: needs maintainer review before merge. :: none
  • reviewed 2026-07-18T02:49:39.832Z sha 580f3d9a78cb9714fdc00f95cf860d72e47692db :: found issues before merge. :: [P2] Guard optional agent IDs in the doctor lookup
  • reviewed 2026-07-18T03:06:32.665Z sha d6574cce2d571b777a017f150a77a1e576c0b4a4 :: needs changes before merge. :: [P2] Guard optional agent IDs in the doctor lookup
  • reviewed 2026-07-18T05:23:22.630Z sha 8affa607ce5f92e556f939d9495a967224fa6681 :: found issues before merge. :: [P2] Guard optional agent IDs in the doctor lookup
  • reviewed 2026-07-18T05:58:17.119Z sha 7032b86168c43a2af5e0b584f581be6498d2fc4c :: needs changes before merge. :: [P2] Guard missing agent IDs in the doctor lookup

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Jul 5, 2026
@davemorin davemorin changed the title feat: let assistants remember across private conversations feat: let agents remember across private conversations Jul 5, 2026
@davemorin
davemorin force-pushed the feat/remember-across-conversations branch from a5ec482 to 48fc398 Compare July 5, 2026 20:20
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Jul 5, 2026
@davemorin
davemorin force-pushed the feat/remember-across-conversations branch 2 times, most recently from 16c31aa to 9b81709 Compare July 6, 2026 02:49
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jul 6, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jul 18, 2026
@steipete
steipete force-pushed the feat/remember-across-conversations branch from 7032b86 to ae9c6ea Compare July 18, 2026 07:07
@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jul 18, 2026
@steipete
steipete merged commit 4b3ee5e into openclaw:main Jul 18, 2026
116 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 19, 2026
* feat(memory): remember across private conversations

Co-authored-by: Vincent Koc <[email protected]>

* chore(docs): regenerate config baseline

* fix(memory): restore recall configuration wiring

* fix(memory): scope recall transcript indexing

* test(memory): repair conversation recall fixtures

* test(memory): split session visibility coverage

* style(memory): format type imports

---------

Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
* feat(memory): remember across private conversations

Co-authored-by: Vincent Koc <[email protected]>

* chore(docs): regenerate config baseline

* fix(memory): restore recall configuration wiring

* fix(memory): scope recall transcript indexing

* test(memory): repair conversation recall fixtures

* test(memory): split session visibility coverage

* style(memory): format type imports

---------

Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
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 docs Improvements or additions to documentation extensions: memory-core Extension: memory-core extensions: qa-lab feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. maintainer Maintainer-authored PR mantis: telegram-visible-proof Mantis should capture Telegram visible proof. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Let personal assistants remember across private conversations

4 participants