Runnable demo

Watch memory carry from Codex CLI to Claude Code.

A five-minute, source-checkout demo that stores a real Remnic project decision, switches agent sessions, recalls the correct scoped context, and prints the X-ray reason for every memory that surfaced.

  • Real @remnic/core Orchestrator
  • Real EngramAccessService write path
  • Real recallXray(includeRecall=true)
  • No OpenAI, QMD, embeddings, or private API keys
real-remnic-demo

codex-cli:session-a

remember

memoryStore(namespace="project-checkout-service")

Decision and preference are persisted as real Remnic memory files.

claude-code:session-b

recall

recallXray(includeRecall=true)

Only checkout-service memories return. Marketing-site stays out.

why it surfaced

scope=namespace:project-checkout-service servedBy=recent-scan

One memory layer, two coding-agent tools, no hand-waving.

The demo is intentionally small: store a preference and decision in one tool, switch sessions, then ask the second tool to recall the same project context with an explanation.

1

Codex CLI stores project memory

The demo writes a checkout-service decision and preference through EngramAccessService.memoryStore().

2

A different tool starts a new session

The active identity switches from codex-cli:session-a to claude-code:session-b.

3

Remnic recalls the right scope

The second session queries project-checkout-service and does not receive the unrelated marketing-site decision.

4

The X-ray explains why

Each surfaced memory includes namespace scope and retrieval provenance so the agent can inspect why context appeared.

Copy, run, inspect the proof.

It works locally from the open-source repo. By default it disables OpenAI, QMD, embeddings, local LLMs, and direct-answer annotation, so no private API keys are required.

Node.js 22.12+ pnpm No daemon required
01 git clone https://github.com/joshuaswarren/remnic.git
02 cd remnic
03 pnpm install
04 pnpm run demo:coding-agent-memory
05 pnpm run test:coding-agent-memory-demo

The terminal tells the story.

The important lines are the scoped write, the cross-session recall, the X-ray reason, and the scope check that confirms unrelated memory did not leak in.

$ pnpm run demo:coding-agent-memory

Remnic coding-agent memory demo
engine: real @remnic/core Orchestrator + EngramAccessService
apiKeys: none (OpenAI disabled, QMD disabled)

1) codex-cli / session-a stores real Remnic memories via memoryStore()
stored decision "checkout retry-policy decision" -> namespace=project-checkout-service status=stored
stored preference "checkout change-note preference" -> namespace=project-checkout-service status=stored
stored decision "marketing-site unrelated decision" -> namespace=project-marketing-site status=stored

2) switch to claude-code / session-b and recall through recallXray(includeRecall=true)
active namespace: project-checkout-service
query: payment retry policy decision and change notes
recalled 2 real Remnic memories
- preference
  why: scope=namespace:project-checkout-service; servedBy=recent-scan; served-by=recent-scan
- decision
  why: scope=namespace:project-checkout-service; servedBy=recent-scan; served-by=recent-scan

3) scope check
marketing memory surfaced: no
result: PASS - claude-code:session-b recalled checkout-service context written by codex-cli:session-a using real Remnic storage and recall.

Why this is real

The script creates a real @remnic/core orchestrator, writes through EngramAccessService.memoryStore(), and recalls through EngramAccessService.recallXray(). It is in-process so you can run it from a checkout without starting the daemon, but it uses the same access-service path.

Why this is scoped

Checkout-service memories are written to project-checkout-service. The unrelated marketing-site decision is written to project-marketing-site. The recall query runs only in the checkout namespace and reports the namespace in its X-ray.

Why new users can trust it

The generated memory files live under the demo directory, are gitignored, and can be reset safely. The smoke test asserts the output, persisted markdown, tilde expansion, and reset guard rails.

Try the demo, then connect your real agents.

Once the source demo makes the flow concrete, install the daemon and connectors so Remnic can follow you across the coding agents you already use.