Branch8

Recall Project Memory Claude Code Integration: A Build Guide

Matt Li, Elton Chan
November 30, 2026
12 mins read
Recall Project Memory Claude Code Integration: A Build Guide - Hero Image

Key Takeaways

  • Bigger context windows don't fix memory; curation does.
  • Store decisions, constraints and gotchas — not conversation transcripts.
  • Use CLAUDE.md for always-on rules, Recall for on-demand retrieval.
  • Anchor memories to commits so staleness is visible, not silent.
  • Commit shared memory to git so teammates can review it.

Quick Answer: Integrating Recall with Claude Code means registering a memory MCP server in .mcp.json, defining a short CLAUDE.md rule layer, storing typed memories (decision, constraint, gotcha, convention, state) as versioned JSONL, and auto-loading relevant entries via SessionStart hooks anchored to git commits.


Bigger context windows will not fix your memory problem. That is the contrarian part, and most engineering leads I talk to across Hong Kong, Singapore and Ho Chi Minh City disagree until they watch the token bill. A Recall project memory Claude Code integration works not because it stores more, but because it stores less, deliberately — curated decisions instead of raw transcript. Context length is storage. Memory is editorial judgement. They are different disciplines, and conflating them is why most teams' AI workflows degrade by week three.

Related reading: Minimum Viable Unit Saleable Software Patterns for APAC Teams

Related reading: Minimum Viable Unit Saleable Software Patterns for APAC Teams

I run a distributed engineering and talent operation. The analogy I keep coming back to: a 200,000-token context window is like hiring a brilliant contractor with total recall of everything said in the room today, and zero recollection of yesterday. You do not solve that by making the room bigger. You solve it with a handover document — the same way we onboard a developer in Manila onto a codebase that a team in Taipei has been shaping for two years.

This guide walks through wiring local project memory into Claude Code, step by step, with configuration you can copy. It assumes you want memory that lives in your repo and on your machine — not in a vendor's cloud store.

Why local memory beats a hosted memory service for most APAC teams

Three reasons, in order of how often they actually bite.

Data residency. If you operate across Singapore (PDPA), Hong Kong (PDPO), Australia (Privacy Act) and increasingly Vietnam's Decree 13, pushing architectural notes that quote internal schema and customer-flow logic into a third-party memory SaaS creates a review conversation you do not need. Local files under your existing repo controls inherit the governance you already passed.

Related reading: Shopify Plus Merchant Noibu Analytics Platform: An APAC Buyer's View

Cost shape. Anthropic's own documentation prices long-context usage at a premium above the 200K-token threshold on Claude models, which means the "just paste everything" strategy has a non-linear cost curve. Retrieval of 2KB of curated decisions is categorically cheaper than re-reading 40 files.

Related reading: MR DIY Adobe Commerce to Shopify Migration: The APAC Cost Lesson

Evidence that unmanaged AI assistance can hurt. METR's 2025 randomised controlled trial of experienced open-source developers found participants were roughly 19% slower when using early-2025 AI tools — while believing they had been faster. Google's 2024 DORA report similarly found AI adoption correlated with a decline in delivery throughput and stability even as developers reported higher satisfaction. Both findings point the same way: the bottleneck is context quality and rework, not raw generation speed. Memory is a context-quality intervention.

Meanwhile adoption keeps climbing — Stack Overflow's 2025 Developer Survey put AI tool usage among professional developers above 80% using or planning to use them, with trust in output notably lower than usage. More people using tools they trust less is exactly the condition where a disciplined memory layer pays for itself.

Prerequisites

Before you start, have the following in place. Skipping any of these turns the rest into debugging rather than building.

  • Claude Code installed and authenticated. Verify with claude --version. Anything from the 1.x line supports project-scoped MCP configuration and hooks.
  • Node.js 18+ or Python 3.10+, depending on which Recall distribution you pick. There are several projects using the name; the two common shapes are an MCP server (e.g. joseairosa/recall on GitHub, a Redis-backed persistent memory server) and a local-file-first "project memory" CLI. The configuration patterns below apply to both.
  • Git repository with write access. Memory that is not versioned alongside code drifts away from the code it describes.
  • A decision on scope: repo-committed memory (shared with the team) versus machine-local memory (private). You will want both. Step 6 covers the split.
  • If using the Redis-backed variant: a local Redis instance. docker run -d -p 6379:6379 redis:7-alpine is enough for a single developer.
  • 15 minutes of honest inventory. Step 1.

Ready to Transform Your Ecommerce Operations?

Branch8 specializes in ecommerce platform implementation and AI-powered automation solutions. Contact us today to discuss your ecommerce automation strategy.

Step 1: Inventory what your team re-explains every session

Do not install anything yet. Open a text file and write down every piece of context you typed into Claude Code more than twice last week.

In practice the list looks like this for a mid-sized commerce codebase:

Related reading: MR DIY Adobe Commerce to Shopify Migration: APAC Lessons

1- We use Drizzle, not Prisma. Never suggest Prisma migrations.
2- Money is stored in minor units (cents) as integers. Never floats.
3- The `legacy_orders` table is read-only; writes go through the orders service.
4- Payment provider is Stripe in SG/AU, Adyen in HK. Branch on `region`.
5- We rejected GraphQL in March 2024. Reason: ops burden, single team.
6- Tests use Vitest. Jest config in /packages/old is dead code.

This is your memory seed set. Note what it is not: it is not a file listing, not a summary of your source tree, and not conversation history. Claude Code can read files. It cannot read the decisions you made in a meeting and the reasons you rejected the alternative.

I think of this exactly like the onboarding brief we write when a new developer joins a client team. The useful half is never "here's the repo." It is "here's what we tried, here's what failed, here's the landmine." Tribal knowledge is the expensive part, whether the recipient is human or a model.

Step 2: Install Recall and register it as an MCP server

Claude Code discovers external tools through the Model Context Protocol. Project-scoped servers go in a .mcp.json at the repo root, which means every engineer who clones the repo gets the same memory tooling.

For an npx-distributed server:

1{
2 "mcpServers": {
3 "recall": {
4 "command": "npx",
5 "args": ["-y", "@recall/mcp-server"],
6 "env": {
7 "RECALL_STORAGE_PATH": "${workspaceFolder}/.recall",
8 "RECALL_MODE": "local"
9 }
10 }
11 }
12}

For the Redis-backed variant:

1{
2 "mcpServers": {
3 "recall": {
4 "command": "npx",
5 "args": ["-y", "@joseairosa/recall"],
6 "env": {
7 "REDIS_URL": "redis://localhost:6379",
8 "RECALL_NAMESPACE": "acme-commerce"
9 }
10 }
11 }
12}

Set the namespace per repository. Shared namespaces across projects are the fastest way to get a model confidently applying your fintech client's auth pattern to a retail codebase.

Verify registration:

1claude mcp list
2# recall connected stdio 5 tools
3
4claude mcp get recall
5# Tools: store_memory, recall_memories, search_memories,
6# list_namespaces, forget_memory

If you see failed to connect, run the server command directly in your shell first — nine times out of ten it is a Node version mismatch or a Redis connection refused, and the MCP layer swallows the stderr.

Ready to Transform Your Ecommerce Operations?

Branch8 specializes in ecommerce platform implementation and AI-powered automation solutions. Contact us today to discuss your ecommerce automation strategy.

Step 3: Set up the CLAUDE.md hierarchy as your always-loaded layer

Recall handles retrieval on demand. CLAUDE.md handles the non-negotiables that must be in context every single session. You need both, and teams that pick only one end up unhappy.

Claude Code reads memory files hierarchically: enterprise-level, then user-level (~/.claude/CLAUDE.md), then project root, then subdirectories as you navigate into them. Keep the root file brutally short — under 100 lines. It is a constitution, not a wiki.

1# Project Memory
2
3## Hard rules
4- ORM is Drizzle. Prisma suggestions are always wrong here.
5- Currency: integer minor units. Never float arithmetic on money.
6- `legacy_orders` is read-only.
7
8## Memory protocol
9- At session start, call `recall_memories` for the active module.
10- Before any architectural change, `search_memories` for prior decisions.
11- After a decision is made, `store_memory` with type=decision and the rejected alternative.
12
13## Imports
14@docs/architecture/payments.md
15@.recall/INDEX.md

The @path import syntax pulls in additional files, so you can keep deep detail out of the root file while still making it reachable. Point one import at your Recall index so the model knows what memory exists before it decides whether to query.

Subdirectory CLAUDE.md files are underused. Drop one in packages/payments/ containing only payments context; it loads when Claude reads files in that directory and stays out of context otherwise.

Step 4: Write memories with a schema, not freeform prose

This is where most integrations fall apart. People store "we talked about caching today" and wonder why retrieval is useless six weeks later.

Give every memory a type, a scope, and a timestamp. A workable minimum schema:

1{
2 "type": "decision",
3 "scope": "packages/payments",
4 "title": "Adyen for HK, Stripe for SG/AU",
5 "body": "HK entity cannot settle via Stripe due to local acquiring. Branch on order.region at checkout service level, not in UI.",
6 "rejected": "Single-provider Stripe with manual HK reconciliation — rejected, ops cost.",
7 "commit": "a93f1c2",
8 "created": "2025-03-11",
9 "tags": ["payments", "region", "architecture"]
10}

Five types cover almost everything:

  • decision — what was chosen, what was rejected, and why
  • constraint — a fact that cannot change (regulatory, contractual, physical)
  • gotcha — something that looked obvious and was wrong
  • convention — team style that is not enforced by a linter
  • state — where an in-flight piece of work stopped

Only state memories should expire quickly. The other four are durable assets. If you cannot classify something into one of the five, it probably belongs in a code comment or a ticket, not in project memory.

Store from inside a session with natural language — the MCP tool handles the call:

1> Store a decision memory: we're keeping the monolith for checkout.
2> Rejected: extracting a checkout service. Reason: single team, no
3> independent deploy need until we're past 3 squads. Scope: apps/web.

Ready to Transform Your Ecommerce Operations?

Branch8 specializes in ecommerce platform implementation and AI-powered automation solutions. Contact us today to discuss your ecommerce automation strategy.

Step 5: Automate retrieval with session hooks

Manual recall fails because humans forget. Hooks fire deterministically. Claude Code supports lifecycle hooks in .claude/settings.json, and SessionStart plus PreCompact are the two that matter for memory.

1{
2 "hooks": {
3 "SessionStart": [
4 {
5 "matcher": "startup|resume",
6 "hooks": [
7 {
8 "type": "command",
9 "command": "bash .claude/scripts/load-memory.sh"
10 }
11 ]
12 }
13 ],
14 "PreCompact": [
15 {
16 "matcher": "auto",
17 "hooks": [
18 {
19 "type": "command",
20 "command": "bash .claude/scripts/checkpoint-memory.sh"
21 }
22 ]
23 }
24 ]
25 }
26}

The loader script injects recent memory as context at session start. Keep it small — this runs on every session and goes straight into your token budget.

1#!/usr/bin/env bash
2# .claude/scripts/load-memory.sh
3set -euo pipefail
4
5BRANCH=$(git rev-parse --abbrev-ref HEAD)
6RECENT=$(git log -5 --pretty=format:'%h %s')
7
8echo "## Session context"
9echo "Branch: ${BRANCH}"
10echo "Recent commits:"
11echo "${RECENT}"
12echo ""
13echo "## Active project memory"
14
15# Pull decisions + constraints touching files changed on this branch
16python3 .claude/scripts/recall_query.py \
17 --types decision,constraint \
18 --scope "$(git diff --name-only main... | xargs -r dirname | sort -u | head -5)" \
19 --limit 12

And the query helper, for the Python-stack teams asking about this:

1#!/usr/bin/env python3
2# .claude/scripts/recall_query.py
3import argparse, json, pathlib, datetime
4
5STORE = pathlib.Path(".recall/memories.jsonl")
6
7def load():
8 if not STORE.exists():
9 return []
10 with STORE.open() as f:
11 return [json.loads(line) for line in f if line.strip()]
12
13def main():
14 p = argparse.ArgumentParser()
15 p.add_argument("--types", default="decision,constraint")
16 p.add_argument("--scope", default="")
17 p.add_argument("--limit", type=int, default=10)
18 a = p.parse_args()
19
20 types = set(a.types.split(","))
21 scopes = [s for s in a.scope.split() if s]
22
23 rows = [
24 m for m in load()
25 if m.get("type") in types
26 and (not scopes or any(m.get("scope", "").startswith(s) for s in scopes))
27 ]
28 rows.sort(key=lambda m: m.get("created", ""), reverse=True)
29
30 for m in rows[: a.limit]:
31 print(f"- [{m['type']}] {m['title']}")
32 print(f" {m['body']}")
33 if m.get("rejected"):
34 print(f" Rejected: {m['rejected']}")
35
36if __name__ == "__main__":
37 main()

JSONL as the storage format is a deliberate choice: diffable in git, greppable from the shell, and readable by a human in a code review. A vector database is more powerful and far harder to audit. Start with files; add embeddings only when grep genuinely stops working.

Step 6: Tie memory to code state with a git hook

The sharpest criticism of memory tools — and the one raised repeatedly in the Reddit and dev.to discussions on this topic — is that memory goes stale against the code. A decision recorded in March describes a file that was deleted in June, and the model confidently cites it.

Fix it by anchoring memories to commits and flagging drift.

1#!/usr/bin/env bash
2# .git/hooks/post-commit
3set -euo pipefail
4
5COMMIT=$(git rev-parse --short HEAD)
6CHANGED=$(git diff-tree --no-commit-id --name-only -r HEAD)
7
8python3 - "$COMMIT" <<'PY'
9import json, pathlib, subprocess, sys
10
11commit = sys.argv[1]
12store = pathlib.Path(".recall/memories.jsonl")
13if not store.exists():
14 sys.exit(0)
15
16changed = set(subprocess.check_output(
17 ["git", "diff-tree", "--no-commit-id", "--name-only", "-r", "HEAD"],
18 text=True).split())
19
20out = []
21for line in store.read_text().splitlines():
22 if not line.strip():
23 continue
24 m = json.loads(line)
25 scope = m.get("scope", "")
26 if scope and any(c.startswith(scope) for c in changed):
27 m["stale_since"] = commit
28 out.append(json.dumps(m))
29
30store.write_text("\n".join(out) + "\n")
31PY

Now any memory whose scope was touched carries a stale_since marker. Surface it in retrieval output as a caution rather than deleting it — a stale decision still tells you why something was done, even if the implementation moved.

Review stale memories at the same cadence you review dependencies. Monthly is enough for most teams.

Ready to Transform Your Ecommerce Operations?

Branch8 specializes in ecommerce platform implementation and AI-powered automation solutions. Contact us today to discuss your ecommerce automation strategy.

Step 7: Split shared memory from private memory

This is the organisational design question hiding inside a technical setup, and it matters more for distributed teams than co-located ones.

1# .gitignore
2.recall/scratch/ # personal, machine-local
3.recall/sessions/ # raw session state, noisy
4!.recall/memories.jsonl # shared, reviewed
5!.recall/INDEX.md

Committed memory goes through pull request review like any other artefact. That is the point. When an engineer in Kuala Lumpur records "we always soft-delete," a reviewer in Sydney can challenge it before it becomes doctrine that an AI agent enforces for the next eighteen months.

We have seen this shape work well at a regional multi-brand retail group running engineering across three markets, where the handover problem between time zones was the real constraint — not individual developer speed. Codifying decisions in a reviewed, repo-committed memory file did something subtler than speeding up Claude Code: it forced the decisions to be written down at all. The AI integration was the pretext. The documentation discipline was the actual deliverable.

An honest caution on that: I have no measured productivity figure to offer you from it, and anyone quoting you a precise percentage uplift from a memory tool is extrapolating.

Step 8: Test whether retrieval actually works

Treat memory like any other retrieval system — it needs an evaluation loop, however crude.

Write ten questions whose answers live only in memory, never in the code:

11. Why did we reject GraphQL?
22. Which payment provider is used in HK and why not Stripe?
33. What is the money storage convention?
44. Which test runner is live and which is dead code?
55. What is the write path for legacy_orders?

Run them in a fresh session, with no files open:

1claude -p "Why did we reject GraphQL? Cite the memory you used." \
2 --output-format json | jq '.result'

Score each answer correct, wrong, or hallucinated. A wrong answer usually means bad memory writing — vague titles, missing scope. A hallucinated answer means the model is not calling the tool at all, which is a CLAUDE.md protocol problem, not a storage problem. Re-run after every schema change.

Ready to Transform Your Ecommerce Operations?

Branch8 specializes in ecommerce platform implementation and AI-powered automation solutions. Contact us today to discuss your ecommerce automation strategy.

Step 9: Prune on a schedule

Memory systems fail by accumulation, not by loss. A store with 800 entries where 600 are session state is worse than a store with 40 curated decisions, because retrieval precision collapses.

1# Drop state memories older than 30 days; keep everything else
2python3 - <<'PY'
3import json, pathlib, datetime
4store = pathlib.Path(".recall/memories.jsonl")
5cutoff = (datetime.date.today() - datetime.timedelta(days=30)).isoformat()
6keep = []
7for line in store.read_text().splitlines():
8 if not line.strip():
9 continue
10 m = json.loads(line)
11 if m.get("type") == "state" and m.get("created", "") < cutoff:
12 continue
13 keep.append(json.dumps(m))
14store.write_text("\n".join(keep) + "\n")
15print(f"kept {len(keep)} memories")
16PY

Put it in CI on a monthly cron and open a PR with the diff. Pruning that nobody reviews is just quiet deletion.

What to do next

Start with Steps 1, 3 and 4 only — inventory, CLAUDE.md, and a schema. You can run those with zero installation and you will capture most of the value within a week. Add the MCP server and hooks once you have more than about thirty memories and manual retrieval genuinely annoys you. Teams that install the full Recall project memory Claude Code integration on day one usually end up with elaborate plumbing moving almost no signal.

After that, the natural extensions are running the same memory store against multiple agents (the MCP layer is model-agnostic), and wiring memory writes into your existing automation — an n8n or Make workflow that converts merged architecture-decision-record PRs into memory entries removes the human discipline requirement entirely.

Who this is not for

Be honest about fit. If you are a solo developer on a project under about 5,000 lines, the overhead exceeds the benefit — CLAUDE.md alone is your answer. If your codebase is genuinely self-documenting with strong types and small modules, the model can read it faster than it can query your memory store. If your team will not review memory PRs, you are building a system that will encode one engineer's opinions as organisational truth, which is worse than no memory. And if you are in a regulated environment where any persisted context needs formal data classification, resolve that with compliance before you write the first entry, not after.

The trade-off underneath all of this: memory adds a maintenance surface. You are taking on a second artefact that can drift from the code, the way stale documentation always has. The difference is that stale documentation gets ignored, while stale memory gets confidently acted upon by an agent. Budget the review time or do not start.

If you are scaling an engineering team across multiple APAC markets and want help designing the AI-assisted workflows and handover practices that make distributed delivery actually work, Branch8's engineering teams build and operate this kind of tooling across Hong Kong, Singapore, Taiwan and Southeast Asia — get in touch.

Ready to Transform Your Ecommerce Operations?

Branch8 specializes in ecommerce platform implementation and AI-powered automation solutions. Contact us today to discuss your ecommerce automation strategy.

Sources

FAQ

Recall is a persistent memory layer that connects to Claude Code through the Model Context Protocol, letting the assistant store and retrieve project context across sessions instead of starting cold each time. Implementations vary — some use local JSON/JSONL files in your repo, others back onto Redis or a vector store. The common goal is eliminating the need to re-explain architecture, conventions and past decisions every session.

About the Author

Matt Li

Co-Founder & CEO, Branch8 & Second Talent

Matt Li is Co-Founder and CEO of Branch8, a Y Combinator-backed (S15) Adobe Solution Partner and e-commerce consultancy headquartered in Hong Kong, and Co-Founder of Second Talent, a global tech hiring platform ranked #1 in Global Hiring on G2. With 12 years of experience in e-commerce strategy, platform implementation, and digital operations, he has led delivery of Adobe Commerce Cloud projects for enterprise clients including Chow Sang Sang, HomePlus (HKBN), Maxim's, Hong Kong International Airport, Hotai/Toyota, and Evisu. Prior to founding Branch8, Matt served as Vice President of Mid-Market Enterprises at HSBC. He serves as Vice Chairman of the Hong Kong E-Commerce Business Association (HKEBA). A self-taught software engineer, Matt graduated from the University of Toronto with a Bachelor of Commerce in Finance and Economics.

About the Author

Elton Chan

Co-Founder, Second Talent & Branch8

Elton Chan is Co-Founder of Second Talent, a global tech hiring platform connecting companies with top-tier tech talent across Asia, ranked #1 in Global Hiring on G2 with a network of over 100,000 pre-vetted developers. He is also Co-Founder of Branch8, a Y Combinator-backed (S15) e-commerce technology firm headquartered in Hong Kong. With 14 years of experience spanning management consulting at Accenture (Dublin), cross-border e-commerce at Lazada Group (Singapore) under Rocket Internet, and enterprise platform delivery at Branch8, Elton brings a rare blend of strategy, technology, and operations expertise. He served as Founding Chairman of the Hong Kong E-Commerce Business Association (HKEBA), driving digital commerce education and cross-border collaboration across Asia. His work bridges technology, talent, and business strategy to help companies scale in an increasingly remote and digital world.