Skip to content

refactor(ai-memory): align MemoryScope to shared Scope (threadId)#991

Open
tombeckenham wants to merge 9 commits into
mainfrom
990-refactorai-memory-align-memoryscope-to-shared-scope-threadid-from-980
Open

refactor(ai-memory): align MemoryScope to shared Scope (threadId)#991
tombeckenham wants to merge 9 commits into
mainfrom
990-refactorai-memory-align-memoryscope-to-shared-scope-threadid-from-980

Conversation

@tombeckenham

@tombeckenham tombeckenham commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Alias MemoryScope to the shared Scope type from @tanstack/ai (threadId required; optional userId / tenantId / namespace).
  • Migrate adapters, middleware, DevTools, event payloads, panel, and e2e routes from sessionIdthreadId.
  • Redis index keys become {tenantId|_}:{userId|_}:{threadId} (escaped); hindsight banks use {user}__{threadId}.
  • Docs and skills teach Scope / threadId as the isolation vocabulary (no public sessionId on memory scope). Hard cut — @tanstack/ai-memory is still 0.x.

Closes #990

Test plan

  • pnpm --filter @tanstack/ai-memory test:lib (43 tests)
  • pnpm --filter @tanstack/ai-memory test:types
  • pnpm --filter @tanstack/ai-devtools-core test:lib + test:types
  • pnpm --filter @tanstack/ai-client devtools tests + typecheck
  • pnpm --filter @tanstack/ai-event-client test:lib + test:types
  • CI green on PR

Summary by CodeRabbit

  • Breaking Changes
    • Memory isolation now uses threadId instead of sessionId; MemoryScope is aligned to the shared Scope contract (threadId required, tenantId/userId optional, namespace reserved).
    • Redis/hindsight key layouts were updated and existing persisted entries aren’t dual-read; reindexing/cleanup may be needed.
    • Devtools/telemetry event payloads now expect thread-based scope; memory:error may omit scope when resolution fails.
  • New Features
    • Thread-aware isolation across providers, including mem0 per-thread run_id.
    • DevTools memory panel shows improved composite scope labeling.
  • Documentation
    • Updated quickstart, security guidance, and adapter/skill docs to use threadId and trusted server-side scope derivation.
  • Tests
    • Updated contract, provider, middleware, devtools, and E2E coverage for the new scope fields and isolation rules.

Replace MemoryScope.sessionId with the shared Scope type from @tanstack/ai
so memory and persistence use one conversation key (threadId) plus optional
userId/tenantId. Update adapters, middleware, devtools, docs, and panel/e2e
call sites. Hard cut — package is still 0.x.

Closes #990
@tombeckenham tombeckenham linked an issue Jul 24, 2026 that may be closed by this pull request
4 tasks
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f8119d0e-0a65-4920-b1b7-6b324bc94e28

📥 Commits

Reviewing files that changed from the base of the PR and between b4f9744 and 5dfc0eb.

📒 Files selected for processing (6)
  • docs/memory/operating.md
  • packages/ai-devtools/src/store/memory-registry.ts
  • packages/ai-devtools/tests/memory-registry.test.ts
  • packages/ai-event-client/src/index.ts
  • packages/ai-memory/skills/tanstack-ai-memory/SKILL.md
  • packages/ai-memory/src/middleware.ts
🚧 Files skipped from review as they are similar to previous changes (5)
  • packages/ai-event-client/src/index.ts
  • packages/ai-devtools/tests/memory-registry.test.ts
  • packages/ai-memory/skills/tanstack-ai-memory/SKILL.md
  • packages/ai-memory/src/middleware.ts
  • packages/ai-devtools/src/store/memory-registry.ts

📝 Walkthrough

Walkthrough

Memory isolation now uses the shared Scope contract: threadId replaces sessionId, tenant and user dimensions participate in isolation, providers and devtools are updated, panel and E2E flows use thread identifiers, and documentation and tests reflect the new behavior.

Changes

Memory scope contract and devtools

Layer / File(s) Summary
Shared scope matching and devtools state
packages/ai-memory/src/types.ts, packages/ai-memory/src/internal/*, packages/ai-event-client/src/index.ts, packages/ai-client/src/devtools.ts, packages/ai-devtools/src/store/*, packages/ai-devtools/src/components/hooks/MemoryPanel.tsx
MemoryScope aliases shared Scope; matching, registry keys, labels, fallback state, and event payload types use threadId with tenant-aware composite identity.
Scope behavior tests
packages/ai-memory/src/internal/store.test.ts, packages/ai-memory/tests/*, packages/ai-devtools/tests/*, packages/ai-client/tests/*
Tests cover thread, user, tenant, optional-dimension, collision, provider, and devtools event behavior.

Adapter and storage migration

Layer / File(s) Summary
Provider keying and request isolation
packages/ai-memory/src/providers/*
Hindsight, Honcho, mem0, and Redis derive storage or request identifiers from threadId, with tenant-aware keys where supported and escaped Redis segments.
Provider and contract validation
packages/ai-memory/tests/*, packages/ai-memory/vite.config.ts
Contract and provider tests validate thread, user, tenant, malformed-record, request-payload, and Redis key-isolation behavior; source tests are included in coverage.

Panel and E2E thread integration

Layer / File(s) Summary
Panel scope persistence and routes
testing/panel/src/lib/memory-store.ts, testing/panel/src/routes/api.memory-*
Panel memory uses persisted thread identifiers, server-defined demo identity fields, composite scope keys, and thread-keyed recall inspection.
Panel UI thread lifecycle
testing/panel/src/routes/memory.tsx
The panel stores thread IDs in local storage, sends them to chat and inspection routes, and supports creating a new thread.
E2E memory wiring
testing/e2e/src/routes/*, testing/e2e/src/lib/*
E2E middleware and devtools memory routes use threadId for per-test isolation.

Documentation and release notes

Layer / File(s) Summary
Memory documentation and examples
docs/memory/*
Guides and adapter examples describe threadId, trusted scope derivation, composite key escaping, and provider-specific scope mappings.
Adapter skills
packages/ai-memory/skills/*
Skills document thread-based Hindsight, Honcho, mem0, Redis, and middleware scope behavior.
Release metadata
.changeset/*, docs/config.json
Changesets describe the shared scope alignment and package updates; memory documentation timestamps are advanced.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • TanStack/ai#541: Introduced the memory middleware and adapter foundations updated by this scope migration.
  • TanStack/ai#980: Introduced the shared Scope identity contract adopted by memory.

Suggested reviewers: jherr, alemtuzlak

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change and tests, but it omits the template's required Checklist and Release Impact sections. Add the missing Checklist and Release Impact sections, and fill them out to match the repository template.
Docstring Coverage ⚠️ Warning Docstring coverage is 51.85% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: aligning MemoryScope with the shared Scope threadId model.
Linked Issues check ✅ Passed The PR implements the #990 Scope/threadId migration across memory types, adapters, docs, tests, and keying rules.
Out of Scope Changes check ✅ Passed No clearly unrelated changes stand out; the remaining edits support the Scope/threadId migration and test coverage.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 990-refactorai-memory-align-memoryscope-to-shared-scope-threadid-from-980

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Jul 24, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 5dfc0eb

Command Status Duration Result
nx run-many --targets=build --exclude=examples/... ✅ Succeeded 1m 52s View ↗

☁️ Nx Cloud last updated this comment at 2026-07-24 04:13:11 UTC

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

13 package(s) bumped directly, 36 bumped as dependents.

🟥 Major bumps

Package Version Reason
@tanstack/ai-angular 0.3.1 → 1.0.0 Changeset
@tanstack/ai-durable-stream 0.0.0 → 1.0.0 Changeset
@tanstack/ai-memory 0.0.0 → 1.0.0 Changeset
@tanstack/ai-openrouter 0.15.10 → 1.0.0 Changeset
@tanstack/ai-preact 0.11.1 → 1.0.0 Changeset
@tanstack/ai-react 0.18.1 → 1.0.0 Changeset
@tanstack/ai-solid 0.15.1 → 1.0.0 Changeset
@tanstack/ai-svelte 0.15.1 → 1.0.0 Changeset
@tanstack/ai-vue 0.15.1 → 1.0.0 Changeset
@tanstack/ai-acp 0.2.3 → 1.0.0 Dependent
@tanstack/ai-anthropic 0.16.3 → 1.0.0 Dependent
@tanstack/ai-bedrock 0.1.4 → 1.0.0 Dependent
@tanstack/ai-claude-code 0.2.3 → 1.0.0 Dependent
@tanstack/ai-code-mode 0.3.8 → 1.0.0 Dependent
@tanstack/ai-code-mode-skills 0.3.11 → 1.0.0 Dependent
@tanstack/ai-codex 0.2.3 → 1.0.0 Dependent
@tanstack/ai-elevenlabs 0.2.34 → 1.0.0 Dependent
@tanstack/ai-fal 0.9.12 → 1.0.0 Dependent
@tanstack/ai-gemini 0.20.1 → 1.0.0 Dependent
@tanstack/ai-grok 0.14.9 → 1.0.0 Dependent
@tanstack/ai-grok-build 0.2.3 → 1.0.0 Dependent
@tanstack/ai-groq 0.5.3 → 1.0.0 Dependent
@tanstack/ai-isolate-node 0.1.47 → 1.0.0 Dependent
@tanstack/ai-isolate-quickjs 0.1.47 → 1.0.0 Dependent
@tanstack/ai-mistral 0.2.3 → 1.0.0 Dependent
@tanstack/ai-ollama 0.8.16 → 1.0.0 Dependent
@tanstack/ai-openai 0.17.1 → 1.0.0 Dependent
@tanstack/ai-opencode 0.2.3 → 1.0.0 Dependent
@tanstack/ai-react-ui 0.8.15 → 1.0.0 Dependent
@tanstack/ai-sandbox 0.2.4 → 1.0.0 Dependent
@tanstack/ai-sandbox-cloudflare 0.2.4 → 1.0.0 Dependent
@tanstack/ai-sandbox-daytona 0.2.0 → 1.0.0 Dependent
@tanstack/ai-sandbox-docker 0.2.0 → 1.0.0 Dependent
@tanstack/ai-sandbox-local-process 0.2.0 → 1.0.0 Dependent
@tanstack/ai-sandbox-sprites 0.2.1 → 1.0.0 Dependent
@tanstack/ai-sandbox-vercel 0.2.0 → 1.0.0 Dependent
@tanstack/ai-solid-ui 0.7.14 → 1.0.0 Dependent
@tanstack/openai-base 0.9.9 → 1.0.0 Dependent

🟨 Minor bumps

Package Version Reason
@tanstack/ai 0.42.0 → 0.43.0 Changeset
@tanstack/ai-client 0.22.1 → 0.23.0 Changeset
@tanstack/ai-devtools-core 0.4.24 → 0.5.0 Changeset
@tanstack/ai-event-client 0.6.8 → 0.7.0 Changeset

🟩 Patch bumps

Package Version Reason
@tanstack/ai-isolate-cloudflare 0.2.38 → 0.2.39 Dependent
@tanstack/ai-mcp 0.2.5 → 0.2.6 Dependent
@tanstack/ai-vue-ui 0.2.34 → 0.2.35 Dependent
@tanstack/preact-ai-devtools 0.1.67 → 0.1.68 Dependent
@tanstack/react-ai-devtools 0.2.67 → 0.2.68 Dependent
@tanstack/solid-ai-devtools 0.2.67 → 0.2.68 Dependent
ag-ui 0.0.2 → 0.0.3 Dependent

@pkg-pr-new

pkg-pr-new Bot commented Jul 24, 2026

Copy link
Copy Markdown

Open in StackBlitz

@tanstack/ai

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai@991

@tanstack/ai-acp

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-acp@991

@tanstack/ai-angular

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-angular@991

@tanstack/ai-anthropic

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-anthropic@991

@tanstack/ai-bedrock

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-bedrock@991

@tanstack/ai-claude-code

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-claude-code@991

@tanstack/ai-client

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-client@991

@tanstack/ai-code-mode

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-code-mode@991

@tanstack/ai-code-mode-skills

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-code-mode-skills@991

@tanstack/ai-codex

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-codex@991

@tanstack/ai-devtools-core

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-devtools-core@991

@tanstack/ai-durable-stream

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-durable-stream@991

@tanstack/ai-elevenlabs

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-elevenlabs@991

@tanstack/ai-event-client

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-event-client@991

@tanstack/ai-fal

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-fal@991

@tanstack/ai-gemini

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-gemini@991

@tanstack/ai-grok

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-grok@991

@tanstack/ai-grok-build

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-grok-build@991

@tanstack/ai-groq

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-groq@991

@tanstack/ai-isolate-cloudflare

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-isolate-cloudflare@991

@tanstack/ai-isolate-node

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-isolate-node@991

@tanstack/ai-isolate-quickjs

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-isolate-quickjs@991

@tanstack/ai-mcp

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-mcp@991

@tanstack/ai-memory

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-memory@991

@tanstack/ai-mistral

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-mistral@991

@tanstack/ai-ollama

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-ollama@991

@tanstack/ai-openai

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-openai@991

@tanstack/ai-opencode

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-opencode@991

@tanstack/ai-openrouter

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-openrouter@991

@tanstack/ai-preact

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-preact@991

@tanstack/ai-react

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-react@991

@tanstack/ai-react-ui

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-react-ui@991

@tanstack/ai-sandbox

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-sandbox@991

@tanstack/ai-sandbox-cloudflare

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-sandbox-cloudflare@991

@tanstack/ai-sandbox-daytona

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-sandbox-daytona@991

@tanstack/ai-sandbox-docker

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-sandbox-docker@991

@tanstack/ai-sandbox-local-process

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-sandbox-local-process@991

@tanstack/ai-sandbox-sprites

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-sandbox-sprites@991

@tanstack/ai-sandbox-vercel

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-sandbox-vercel@991

@tanstack/ai-solid

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-solid@991

@tanstack/ai-solid-ui

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-solid-ui@991

@tanstack/ai-svelte

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-svelte@991

@tanstack/ai-utils

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-utils@991

@tanstack/ai-vue

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-vue@991

@tanstack/ai-vue-ui

npm i https://pkg.pr.new/TanStack/ai/@tanstack/ai-vue-ui@991

@tanstack/openai-base

npm i https://pkg.pr.new/TanStack/ai/@tanstack/openai-base@991

@tanstack/preact-ai-devtools

npm i https://pkg.pr.new/TanStack/ai/@tanstack/preact-ai-devtools@991

@tanstack/react-ai-devtools

npm i https://pkg.pr.new/TanStack/ai/@tanstack/react-ai-devtools@991

@tanstack/solid-ai-devtools

npm i https://pkg.pr.new/TanStack/ai/@tanstack/solid-ai-devtools@991

commit: 5dfc0eb

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (3)
docs/memory/quickstart.md (1)

141-145: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a client consumption snippet to this quickstart.

This page covers server middleware and client stream consumption, but the client half is only described in prose. Add a minimal useChat or connection-adapter example alongside this server-side scope example.

As per coding guidelines, documentation pages covering both server and client behavior must include snippets for both halves.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/memory/quickstart.md` around lines 141 - 145, Add a minimal client-side
consumption snippet near the server-side scope example in the quickstart, using
either useChat or the connection adapter. Keep the example focused on
establishing the client connection and consuming the stream, complementing the
existing server middleware example without changing it.

Source: Coding guidelines

packages/ai-devtools/tests/memory-registry.test.ts (1)

109-125: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Add isolation cases for the remaining Scope identifiers.

This test only distinguishes threadId from the (unknown) bucket. Add same-thread cases with different userId, tenantId, and namespace values so thread-only bucketing cannot regress unnoticed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/ai-devtools/tests/memory-registry.test.ts` around lines 109 - 125,
Expand the test case around applyMemoryEvent to add same-thread events that vary
userId, tenantId, and namespace, then assert each scope identifier remains
isolated in state.scopes rather than being bucketed by threadId alone. Preserve
the existing `(unknown)` assertion for the missing threadId case.
testing/panel/src/lib/memory-store.ts (1)

20-24: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Rename the session-named map.

lastRecallBySession is still exported and consumed by the panel routes, although it is now keyed by threadId. Rename it to lastRecallByThread and update both imports/usages to complete the terminology migration.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@testing/panel/src/lib/memory-store.ts` around lines 20 - 24, Rename the
exported map lastRecallBySession to lastRecallByThread in memory-store.ts, then
update both panel route imports and usages to reference the new thread-based
name while preserving the existing Map behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/memory/custom-adapter.md`:
- Around line 98-100: Update the custom adapter persistence example to include
tenantId throughout: add tenant_id to the INSERT columns and parameter list, and
add tenant_id to the corresponding WHERE/filter conditions. Preserve null
handling for scopes without a tenant while ensuring tenant-scoped records cannot
cross tenant boundaries.

In `@packages/ai-devtools/src/store/memory-registry.ts`:
- Around line 84-87: Preserve the complete scope identity through the DevTools
event and registry paths: in packages/ai-devtools/src/store/memory-registry.ts
lines 84-87, update memoryScopeKey to include namespace with threadId; in
packages/ai-event-client/src/index.ts lines 828-836, add optional namespace to
the carried scope type; in packages/ai-client/src/devtools.ts line 34, include
namespace in event payload scopes; in
packages/ai-devtools/src/store/memory-registry.ts lines 63-68, add namespace to
MemoryScopeState; and in lines 101-110, initialize and update that namespace
metadata alongside the existing scope fields.

In `@packages/ai-memory/src/providers/hindsight/index.ts`:
- Around line 114-117: Preserve tenant isolation across vendor-backed memory
identities: in packages/ai-memory/src/providers/hindsight/index.ts lines
114-117, update bankId to include a safely encoded tenant dimension; in
packages/ai-memory/src/providers/honcho/index.ts lines 136-138, tenant-qualify
SDK session, user-peer identities, and cache keys; in
packages/ai-memory/tests/contract.ts lines 16-17, add coverage for identical
userId/threadId values across different tenants while retaining independent
thread/user isolation cases.

In `@packages/ai-memory/tests/providers/mem0.test.ts`:
- Around line 61-67: Update the mem0 adapter’s save, recall, and loadMemories
request construction to include scope.threadId as the conversation/scenario
filter while preserving user scoping. Extend mem0.test.ts with a
same-user/different-thread case that verifies memories do not cross thread
boundaries, covering both persistence and retrieval behavior.

In `@testing/panel/src/routes/api.memory-chat.ts`:
- Line 48: Update memory-chat’s scope construction around threadId and
memory-inspect’s query handling to derive memory scope identifiers from trusted
server/session state rather than client-provided data.threadId or ?threadId.
Include both user and tenant dimensions in the shared in-memory adapter scope,
and apply the same trusted scoping consistently in
testing/panel/src/routes/api.memory-chat.ts:48 and
testing/panel/src/routes/api.memory-inspect.ts:14-19.

---

Nitpick comments:
In `@docs/memory/quickstart.md`:
- Around line 141-145: Add a minimal client-side consumption snippet near the
server-side scope example in the quickstart, using either useChat or the
connection adapter. Keep the example focused on establishing the client
connection and consuming the stream, complementing the existing server
middleware example without changing it.

In `@packages/ai-devtools/tests/memory-registry.test.ts`:
- Around line 109-125: Expand the test case around applyMemoryEvent to add
same-thread events that vary userId, tenantId, and namespace, then assert each
scope identifier remains isolated in state.scopes rather than being bucketed by
threadId alone. Preserve the existing `(unknown)` assertion for the missing
threadId case.

In `@testing/panel/src/lib/memory-store.ts`:
- Around line 20-24: Rename the exported map lastRecallBySession to
lastRecallByThread in memory-store.ts, then update both panel route imports and
usages to reference the new thread-based name while preserving the existing Map
behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 618b9bd0-763b-4641-8ffc-bbb2db32af6f

📥 Commits

Reviewing files that changed from the base of the PR and between 347b61b and 1d6efac.

📒 Files selected for processing (35)
  • docs/config.json
  • docs/memory/adapters.md
  • docs/memory/custom-adapter.md
  • docs/memory/operating.md
  • docs/memory/overview.md
  • docs/memory/quickstart.md
  • packages/ai-client/src/devtools.ts
  • packages/ai-client/tests/devtools.test.ts
  • packages/ai-devtools/src/components/hooks/MemoryPanel.tsx
  • packages/ai-devtools/src/store/ai-context.tsx
  • packages/ai-devtools/src/store/memory-registry.ts
  • packages/ai-devtools/tests/memory-registry.test.ts
  • packages/ai-event-client/src/index.ts
  • packages/ai-memory/skills/tanstack-ai-memory-hindsight/SKILL.md
  • packages/ai-memory/skills/tanstack-ai-memory-redis/SKILL.md
  • packages/ai-memory/skills/tanstack-ai-memory/SKILL.md
  • packages/ai-memory/src/internal/store.ts
  • packages/ai-memory/src/middleware.ts
  • packages/ai-memory/src/providers/hindsight/index.ts
  • packages/ai-memory/src/providers/honcho/index.ts
  • packages/ai-memory/src/providers/redis/index.ts
  • packages/ai-memory/src/types.ts
  • packages/ai-memory/tests/contract.ts
  • packages/ai-memory/tests/middleware.test.ts
  • packages/ai-memory/tests/providers/honcho.test.ts
  • packages/ai-memory/tests/providers/in-memory.test.ts
  • packages/ai-memory/tests/providers/mem0.test.ts
  • packages/ai-memory/tests/providers/redis.test.ts
  • testing/e2e/src/lib/devtools-memory-store.ts
  • testing/e2e/src/routes/api.devtools-memory.ts
  • testing/e2e/src/routes/api.middleware-test.ts
  • testing/panel/src/lib/memory-store.ts
  • testing/panel/src/routes/api.memory-chat.ts
  • testing/panel/src/routes/api.memory-inspect.ts
  • testing/panel/src/routes/memory.tsx

Comment thread docs/memory/custom-adapter.md Outdated
Comment thread packages/ai-devtools/src/store/memory-registry.ts Outdated
Comment thread packages/ai-memory/src/providers/hindsight/index.ts
Comment thread packages/ai-memory/tests/providers/mem0.test.ts
Comment thread testing/panel/src/routes/api.memory-chat.ts Outdated
Add sameScope/redis/contract isolation coverage, composite DevTools scope
keys, vendor Scope field docs, and the memory-scope-threadid changeset.
@tombeckenham
tombeckenham requested review from AlemTuzlak and jherr July 24, 2026 02:38

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/ai-devtools/src/store/memory-registry.ts`:
- Around line 92-105: Update scopeDim, used by memoryScopeKey, so a literal
dimension value of "_" is escaped instead of being emitted as the
absent-dimension sentinel. Preserve "_" for undefined or empty values, while
ensuring literal tenantId/userId "_" produce distinct scope keys.

In `@packages/ai-memory/tests/same-scope.test.ts`:
- Around line 1-2: Move the unit test covering sameScope from the tests
directory into a *.test.ts file alongside the internal/store source, such as
store.test.ts. Preserve the existing test behavior and imports while colocating
it with the sameScope implementation.
- Around line 30-38: Update sameScope and its tests so every Scope dimension,
including omitted or undefined tenantId and userId values, is compared as an
exact match rather than treated as a wildcard. Ensure incomplete queries do not
match records with populated tenant/user dimensions, while preserving matches
for identical scopes and aligning expectations in same-scope.test.ts with the
Scope identity contract.

In `@testing/panel/src/lib/memory-store.ts`:
- Line 24: Update lastRecallByThread and its chat/inspect route callers to key
recall state by the complete collision-safe scope composite used by memory
storage, including threadId plus optional userId, tenantId, and namespace. Reuse
the existing scope-key helper or equivalent established key construction rather
than threadId alone, and ensure all reads and writes use the same key.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1d7f9324-b7ac-446d-a67a-508a72ddada1

📥 Commits

Reviewing files that changed from the base of the PR and between 1d6efac and c5ba7a2.

📒 Files selected for processing (24)
  • .changeset/memory-scope-threadid.md
  • .changeset/shared-scope.md
  • docs/memory/adapters.md
  • docs/memory/overview.md
  • packages/ai-devtools/src/components/hooks/MemoryPanel.tsx
  • packages/ai-devtools/src/store/ai-context.tsx
  • packages/ai-devtools/src/store/memory-registry.ts
  • packages/ai-devtools/tests/memory-registry.test.ts
  • packages/ai-memory/skills/tanstack-ai-memory-hindsight/SKILL.md
  • packages/ai-memory/skills/tanstack-ai-memory-honcho/SKILL.md
  • packages/ai-memory/skills/tanstack-ai-memory-mem0/SKILL.md
  • packages/ai-memory/skills/tanstack-ai-memory-redis/SKILL.md
  • packages/ai-memory/skills/tanstack-ai-memory/SKILL.md
  • packages/ai-memory/src/internal/store.ts
  • packages/ai-memory/src/providers/redis/index.ts
  • packages/ai-memory/src/types.ts
  • packages/ai-memory/tests/contract.ts
  • packages/ai-memory/tests/providers/in-memory.test.ts
  • packages/ai-memory/tests/providers/redis.test.ts
  • packages/ai-memory/tests/same-scope.test.ts
  • testing/panel/src/lib/memory-store.ts
  • testing/panel/src/routes/api.memory-chat.ts
  • testing/panel/src/routes/api.memory-inspect.ts
  • testing/panel/src/routes/memory.tsx
🚧 Files skipped from review as they are similar to previous changes (12)
  • packages/ai-devtools/src/store/ai-context.tsx
  • packages/ai-memory/skills/tanstack-ai-memory-hindsight/SKILL.md
  • testing/panel/src/routes/api.memory-inspect.ts
  • packages/ai-memory/tests/providers/in-memory.test.ts
  • testing/panel/src/routes/api.memory-chat.ts
  • testing/panel/src/routes/memory.tsx
  • docs/memory/overview.md
  • packages/ai-memory/src/providers/redis/index.ts
  • packages/ai-devtools/tests/memory-registry.test.ts
  • packages/ai-memory/src/types.ts
  • packages/ai-memory/src/internal/store.ts
  • packages/ai-memory/skills/tanstack-ai-memory/SKILL.md

Comment thread packages/ai-devtools/src/store/memory-registry.ts Outdated
Comment thread packages/ai-memory/tests/same-scope.test.ts Outdated
Comment thread packages/ai-memory/tests/same-scope.test.ts Outdated
Comment thread testing/panel/src/lib/memory-store.ts
tombeckenham and others added 2 commits July 24, 2026 12:59
Exact-match optional dims in sameScope, tenant-qualify vendor keys, mem0
run_id=threadId, full DevTools Scope identity, panel server-trusted
user/tenant, and custom-adapter tenant_id example.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/ai-memory/skills/tanstack-ai-memory-hindsight/SKILL.md (1)

10-10: 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Use the tenant-aware Hindsight bank-key format consistently.

Line 10 still documents {userId}__{threadId}, which contradicts the adapter and Lines 34-35. Document {tenantId|_}__{user}__{threadId} here as well so tenant isolation is not misrepresented.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/ai-memory/skills/tanstack-ai-memory-hindsight/SKILL.md` at line 10,
Update the bank-key format documented in the skill’s recall description from
{userId}__{threadId} to the tenant-aware {tenantId|_}__{user}__{threadId}
format, matching the adapter and the existing documentation on Lines 34-35.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/memory/adapters.md`:
- Line 144: Update the user row in the documentation table to escape the pipe
character inside the bank-key example as `{tenant\|_}`, preserving the existing
text and table structure.

In `@packages/ai-devtools/src/store/memory-registry.ts`:
- Around line 104-107: Update memoryScopeKey so missing or empty threadId values
produce a dimension-aware registry key that includes tenantId, userId, and
namespace instead of the shared “(unknown)” key. Preserve the existing escaped
threadId key for valid scopes, ensuring ensureScope() keeps events from
different identities isolated.

In `@packages/ai-memory/src/providers/hindsight/index.ts`:
- Around line 115-121: Add a shared collision-safe encoding step for tenant,
user, and thread components before composing vendor identities. In
packages/ai-memory/src/providers/hindsight/index.ts lines 115-121, update bankId
to encode each component and retain _ only for the encoded unset-tenant
sentinel; in packages/ai-memory/src/providers/honcho/index.ts lines 142-158,
apply the same encoding to session keys and tenant-qualified peer IDs,
preserving distinct identities even when values contain __ or delimiter-like
content.

In `@packages/ai-memory/src/providers/mem0/index.ts`:
- Around line 75-81: Update the Mem0 identity helpers userId(scope) and
runId(scope) to derive tenant-scoped identifiers by combining the tenant
isolation value with their existing user and thread scope values. Ensure the
same derivation is reused consistently for save, recall, inspect, and listFacts
operations so identical IDs from different tenants cannot collide.

---

Outside diff comments:
In `@packages/ai-memory/skills/tanstack-ai-memory-hindsight/SKILL.md`:
- Line 10: Update the bank-key format documented in the skill’s recall
description from {userId}__{threadId} to the tenant-aware
{tenantId|_}__{user}__{threadId} format, matching the adapter and the existing
documentation on Lines 34-35.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ad517071-fed1-4771-b6a5-749747f1f1fe

📥 Commits

Reviewing files that changed from the base of the PR and between c5ba7a2 and 38b1f6d.

📒 Files selected for processing (22)
  • docs/memory/adapters.md
  • docs/memory/custom-adapter.md
  • docs/memory/quickstart.md
  • packages/ai-client/src/devtools.ts
  • packages/ai-devtools/src/store/memory-registry.ts
  • packages/ai-devtools/tests/memory-registry.test.ts
  • packages/ai-event-client/src/index.ts
  • packages/ai-memory/skills/tanstack-ai-memory-hindsight/SKILL.md
  • packages/ai-memory/skills/tanstack-ai-memory-honcho/SKILL.md
  • packages/ai-memory/skills/tanstack-ai-memory-mem0/SKILL.md
  • packages/ai-memory/skills/tanstack-ai-memory/SKILL.md
  • packages/ai-memory/src/internal/store.test.ts
  • packages/ai-memory/src/internal/store.ts
  • packages/ai-memory/src/providers/hindsight/index.ts
  • packages/ai-memory/src/providers/honcho/index.ts
  • packages/ai-memory/src/providers/mem0/index.ts
  • packages/ai-memory/src/providers/redis/index.ts
  • packages/ai-memory/tests/providers/mem0.test.ts
  • packages/ai-memory/vite.config.ts
  • testing/panel/src/lib/memory-store.ts
  • testing/panel/src/routes/api.memory-chat.ts
  • testing/panel/src/routes/api.memory-inspect.ts
🚧 Files skipped from review as they are similar to previous changes (10)
  • testing/panel/src/routes/api.memory-inspect.ts
  • packages/ai-memory/skills/tanstack-ai-memory-honcho/SKILL.md
  • packages/ai-event-client/src/index.ts
  • testing/panel/src/routes/api.memory-chat.ts
  • packages/ai-client/src/devtools.ts
  • packages/ai-memory/skills/tanstack-ai-memory/SKILL.md
  • packages/ai-devtools/tests/memory-registry.test.ts
  • packages/ai-memory/tests/providers/mem0.test.ts
  • packages/ai-memory/src/internal/store.ts
  • docs/memory/custom-adapter.md

Comment thread docs/memory/adapters.md Outdated
Comment thread packages/ai-devtools/src/store/memory-registry.ts Outdated
Comment on lines 115 to +121
function bankId(scope: MemoryScope): string {
const user = options.user ?? scope.userId ?? 'demo-user'
return `${user}__${scope.sessionId}`
// Include tenant so multi-tenant deploys cannot share banks when user+thread
// collide. Unset tenant uses `_` (same placeholder convention as redis).
const tenant =
scope.tenantId != null && scope.tenantId !== '' ? scope.tenantId : '_'
return `${tenant}__${user}__${scope.threadId}`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== locate provider files =="
fd -a 'index\.ts$' . | sed 's#^\./##' | grep -E 'packages/ai-memory/src/providers/(hindsight|honcho)/index\.ts$' || true

echo
echo "== hindsight relevant lines =="
if [ -f packages/ai-memory/src/providers/hindsight/index.ts ]; then
  sed -n '1,180p' packages/ai-memory/src/providers/hindsight/index.ts | cat -n
fi

echo
echo "== honcho relevant lines =="
if [ -f packages/ai-memory/src/providers/honcho/index.ts ]; then
  sed -n '1,220p' packages/ai-memory/src/providers/honcho/index.ts | cat -n
fi

echo
echo "== search for MemoryScope usage/types =="
rg -n "type MemoryScope|interface MemoryScope|MemoryScope|tenantId|threadId|userId" packages/ai-memory/src -g '*.ts' | head -200

Repository: TanStack/ai

Length of output: 26216


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== types and scope helpers =="
sed -n '1,180p' packages/ai-memory/src/types.ts | cat -n
echo
sed -n '90,140p' packages/ai-memory/src/internal/store.ts | cat -n

echo
echo "== behavior: raw tenant__component key collisions =="
python3 - <<'PY'
def bank_id(tenant, user, thread):
    t = tenant if tenant is not None and tenant != '' else '_'
    return f"{t}__{user}__{thread}"

def session_key(tenant, thread):
    t = tenant if tenant is not None and tenant != '' else '_'
    return f"{t}__{thread}"

def peer_id(tenant, user):
    user = user if tenant is not None and tenant != '' else user
    return f"{tenant}__{user}" if tenant is not None and tenant != '' else user

def key_equal(key):
    a = b = None
    def set_a(scope):
        nonlocal a
        a = key(scope)
    def set_b(scope):
        nonlocal b
        b = key(scope)
    def check():
      nonlocal a,b
      if a == b:
        if a[0] == tenant:
            return set_a(t)
        else:
            return set_b(b)
      return None
    return key_equal
cases = [
  ("tenant__user__thread"),
  ("_", "user", "thread"),
  ("_", "__user", "thread"),
  ("_", "user", "__thread"),
  ("_@", "user", "thread"),
  ("`@_`", "user", "thread"),
  ("tenant__", "user", "thread"),
  ("tenant__", "", "thread"),
  ("tenant", "_user", "thread"),
]

for key in [bank_id, session_key]:
    print("key:", key.__name__)
    seen = {}
    for vals in [(None, "u", "t"), ('', 'u', 't'), ('_', 'u', 't'), ('a_b', 'u', 't'), ('a', '_b', 't'), ('__', 'u', 't'), ('_', '_', 't'), ('a', 'b__c', 't')]:
        k = key(*vals)
        if k not in seen:
            seen[k] = []
        seen[k].append(vals)
    for k, scopes in seen.items():
        if len(scopes)>1:
            print("collision:", repr(k), "scopes:", [(repr(x) if isinstance(x,str) else x for x in s) for s in scopes])
print("peer collisions")
payloads = [(None, "u"), ('', 'u'), ('_', 'u'), ('a', "u"), ('_', "u")]
for tenant, user in payloads:
    print(repr((tenant,user)), "=>", peer_id(tenant, user))
PY

echo
echo "== redis escapeScopeValue implementation =="
rg -n -A 15 -B 5 "escapeScopeValue|scopeKey|indexKey" packages/ai-memory/src/providers/redis/index.ts packages/ai-memory/src/internal/store.ts

Repository: TanStack/ai

Length of output: 9666


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== redis scope key implementation =="
sed -n '230,275p' packages/ai-memory/src/internal/store.ts | cat -n
echo
sed -n '1,80p' packages/ai-memory/src/providers/redis/index.ts | cat -n
sed -n '95,140p' packages/ai-memory/src/providers/redis/index.ts | cat -n

echo
echo "== programmatic raw-composite collision examples =="
python3 - <<'PY'
def bank_id(tenant, user=None, thread=''):
    user = user if user is not None and user != '' else 'demo-user'
    t = tenant if tenant is not None and tenant != '' else '_'
    return f"{t}__{user}__{thread}"

def session_key(tenant, thread):
    t = tenant if tenant is not None and tenant != '' else '_'
    return f"{t}__{thread}"

def peer_id(tenant, user):
    user = user if user is not None and user != '' else 'demo-user'
    return f"{tenant}__{user}" if tenant is not None and tenant != '' else user

keys = {'bank_id': bank_id, 'session_key': session_key, 'peer_id': peer_id}
cases = {
    'bank_id': [(None, 'u', 't'), ('', 'u', 't'), ('_', 'u', 't'), ('a_b', 'u', 't'), ('__', 'u', 't')],
    'session_key': [(None, 't'), ('', 't'), ('_', 't'), ('a__t', 't')],
    'peer_id': [(None, 'u'), ('', 'u'), ('_', 'u'), ('a', 'u'), ('__a', 'u')],
}
for name, fn in keys.items():
    print(name)
    by = {}
    for vals in cases[name]:
        try:
            k = fn(*vals)
        except Exception as e:
            k = f"ERR:{e}"
        by.setdefault(k, []).append(vals)
    for k, scopes in by.items():
        if len(scopes) > 1:
            print("  collision ->", repr(k))
            for s in scopes:
                print("    ", s)
print("peer cross-tenant sentinel: ", peer_id('_', 'u'), peer_id('a', '_u'))
PY

echo
echo "== all tenant-qualified provider composite key usages =="
rg -n "tenantId|__|scope\.threadId|options\.user|scope\.userId|escapeScopeValue" packages/ai-memory/src/providers packages/ai-memory/src/types.ts packages/ai-memory/src/internal/store.ts

Repository: TanStack/ai

Length of output: 10884


Use collision-safe encoding for tenant-qualified vendor identities.

Both adapters build vendor ids by concatenating tenant dimensions into raw __ keys, so distinct tenant/user/thread combinations can resolve to the same key.

  • packages/ai-memory/src/providers/hindsight/index.ts#L115-L121: escape/encode tenant, user, and thread before composing the bank ID; keep _ only as the escaped unset sentinel.
  • packages/ai-memory/src/providers/honcho/index.ts#L142-L158: apply the same encoding to Honcho session keys and tenant-qualified peer IDs.
📍 Affects 2 files
  • packages/ai-memory/src/providers/hindsight/index.ts#L115-L121 (this comment)
  • packages/ai-memory/src/providers/honcho/index.ts#L142-L158
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/ai-memory/src/providers/hindsight/index.ts` around lines 115 - 121,
Add a shared collision-safe encoding step for tenant, user, and thread
components before composing vendor identities. In
packages/ai-memory/src/providers/hindsight/index.ts lines 115-121, update bankId
to encode each component and retain _ only for the encoded unset-tenant
sentinel; in packages/ai-memory/src/providers/honcho/index.ts lines 142-158,
apply the same encoding to session keys and tenant-qualified peer IDs,
preserving distinct identities even when values contain __ or delimiter-like
content.

Source: Learnings

Comment on lines +75 to +81
/**
* mem0 `run_id` — conversation/run isolation. Maps 1:1 to `scope.threadId` so
* same-user memories do not leak across threads.
*/
function runId(scope: MemoryScope): string {
return scope.threadId
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "## locate file"
fd -a 'index.ts$' . | sed 's#^\./##' | grep 'packages/ai-memory/src/providers/mem0/index.ts' || true

echo "## file outline"
ast-grep outline packages/ai-memory/src/providers/mem0/index.ts --view expanded || true

echo "## relevant lines"
cat -n packages/ai-memory/src/providers/mem0/index.ts | sed -n '1,220p'

echo "## search MemoryScope and tenantId references"
rg -n "interface MemoryScope|type MemoryScope|tenantId|threadId|userId|runId|Mem0|run_id|user_id" packages/ai-memory/src -S

Repository: TanStack/ai

Length of output: 15363


Include tenant isolation in Mem0 identity parameters.

userId(scope) uses the supplied/user-store id directly, and runId(scope) uses only threadId. The same user or thread id from different tenants will be sent as the same user_id / run_id for Mem0 saves, recalls, and list operations, allowing cross-tenant memory leakage. Derive these identifiers from tenant isolation together with the scope values, and keep save, recall, inspect, and listFacts consistent.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/ai-memory/src/providers/mem0/index.ts` around lines 75 - 81, Update
the Mem0 identity helpers userId(scope) and runId(scope) to derive tenant-scoped
identifiers by combining the tenant isolation value with their existing user and
thread scope values. Ensure the same derivation is reused consistently for save,
recall, inspect, and listFacts operations so identical IDs from different
tenants cannot collide.

Source: Learnings

tombeckenham and others added 3 commits July 24, 2026 13:38
Escape table pipes in adapters.md and align the hindsight skill intro with
the tenant-aware bank format.
MemoryScopeLite requires threadId when present; memory:error omits scope
when resolve never ran. Drop emptyScope() and DevTools unknown-bucket fakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(ai-memory): align MemoryScope to shared Scope (threadId) from #980

1 participant