Claude Code session

Recall Stack

5-layer memory system for Claude Code: rules, session state, git context, behavioral learning, knowledge base

33 stars 9 forksSessions & history Source

Install

From source
git clone https://github.com/keshavsuki/recall-stack.git

From the README

Recall Stack
Most people set up CLAUDE.md and call it done. CLAUDE.md is a rules file. It does not remember what you did yesterday, what went wrong last week, or what patterns work best. And when context compacts, even your rules can get lost.

A 5-layer memory system for Claude Code with pre-action gates that physically block repeated mistakes -- even after context compaction.

How It Works

The 5 Layers + Gates

Why gates?

Memory tells the agent what to do. Gates physically prevent what it should not do.

- Memory = "please remember not to force push" (gets lost on compaction)
- Gates = tool call denied before it executes (survives everything)

Gates run at the hook level, not the prompt level. Even if Claude forgets every instruction, the hook still fires and blocks the action.

Why PostCompact?

When Claude compacts context mid-session, Layers 3 and 4 (git context + Hindsight patterns) live in the conversation history and get trimmed. The PostCompact hook re-injects them automatically so Claude does not lose awareness of your codebase state or behavioral patterns.
Why not just CLAUDE.md + primer.md? Layers 1-2 handle rules and state. But Claude still cannot see what changed in your repo since yesterday (Layer 3), does not learn from corrections across sessions (Layer 4), and cannot access your notes (Layer 5). Gates add enforcement that survives compaction. Each piece fills a gap the others cannot.

Quick Start

One-command install

This installs everything immediately. Layer 4 (Hindsight) requires Docker -- the script will guide you.

Or set up manually:

Layer 1+2: CLAUDE.md + primer.md (5 minutes)

Copy the template files:

The key rule in CLAUDE.md:

After your first session, primer.md populates itself. After every task, it rewrites itself. If you kill the…
Read the full README on GitHub

Details

Language
Shell
License
MIT
Last updated
25 March 2026

FAQ

What is Recall Stack?

5-layer memory system for Claude Code: rules, session state, git context, behavioral learning, knowledge base It is a session for Claude Code, from keshavsuki/recall-stack on GitHub.

How do I install Recall Stack?

Clone keshavsuki/recall-stack from GitHub and follow the setup steps in its README.

Is Recall Stack popular?

keshavsuki/recall-stack has 33 GitHub stars and 9 forks. It was last updated on 25 March 2026.

More sessions & history

Browse the most popular Claude Code mods, all sessions & history, or the skills and MCP server directories.