Forge: A Memory System for Claude Code Built with Claude Code

What Forge Does
A developer used Claude Code to build Forge, a tool that solves Claude Code's session-based memory problem. Forge is a 6-package TypeScript monorepo that functions as an MCP server. It processes every conversational turn through a structured pipeline to capture and persist project context.
How It Works
The system uses a six-stage pipeline:
- Classify — Determines if a statement is a decision, constraint, rejection, exploration, goal, correction, or noise.
- Extract — Pulls structured data including the statement, rationale, category, and certainty level.
- Model — Writes to an event-sourced project model (append-only SQLite that never loses history).
- Propagate — Checks for conflicts between decisions and constraints.
- Surface — Notifies about tensions with flow state detection to avoid constant interruptions.
- Execute — Hooks into GitHub to create issues, repos, and commit specs based on decisions.
A key design rule enforced by Claude Code: a decision moving from "leaning" to "decided" is never automatic. You must explicitly commit. Tests enforce this invariant.
Development Details
The build involved several interesting technical challenges:
- Two-stage LLM pipeline — Forge itself calls LLMs to classify and extract decisions from conversation, creating an inception-like scenario where Claude Code writes code that calls Claude. Getting prompts right for reliable classification required significant iteration.
- Event sourcing implementation — Every decision, constraint, and rejection is an append-only event in SQLite. Nothing gets deleted or overwritten, allowing replay of the entire decision history.
- Trust calibration system — Forge tracks how often its classifications are correct and adjusts its interruption threshold. If it's been wrong frequently, it gets quieter. Claude Code built the confidence tracking, interruption budgets, and flow state detection.
- Testing — The project includes 170 tests across 14 test files that caught real bugs during development, particularly around constraint propagation logic.
Integration with Cortex
Forge pairs with another tool called Cortex (also built with Claude Code), a knowledge graph that indexes your codebase. When both are installed as MCP servers, Forge automatically queries Cortex during extraction. For example, if you say "let's switch to PostgreSQL," Forge checks Cortex for existing database references, related services, and migration patterns before recording the decision.
The tools are complementary: Forge knows why (decisions, constraints, intent, rejections) while Cortex knows what (code entities, patterns, dependencies, architecture).
Practical Usage
You install Forge as an MCP server in your project, then talk to Claude Code normally. Behind the scenes, Forge classifies every turn, extracts decisions, and builds a persistent model. In subsequent sessions, Claude Code can check forge://brief to instantly see what's been decided, what's still open, what was explicitly rejected, and where there are active tensions.
📖 Read the full source: r/ClaudeAI
👀 See Also

Multi-Agent Debate Approach Improves LLM Reasoning Quality
A developer experimented with a multi-agent debate approach using CyrcloAI, where different AI agents take on roles like analyst, critic, and synthesizer to critique each other's responses before producing a final answer, resulting in more structured and deliberate outputs.

Bespoke AI v0.8.1: VS Code Autocomplete Extension for Code and Text
Bespoke AI v0.8.1 is a VS Code extension providing autocomplete for both code and text, leveraging Claude Code subscriptions via Anthropic's Agent SDK to avoid API charges while supporting multiple backends including Ollama.

Decision Passport: An Audit Layer for AI Agent Execution Governance
The Claude Code leak highlights a gap in AI agent governance. Decision Passport addresses this with append-only execution records, portable proof bundles, and offline verification for tamper-evident audit trails.

Open-source MCP server bridges Claude Code with IDE tools
An open-source MCP server gives Claude Code persistent access to IDE features including LSP, terminals, Git, GitHub, debugging, and diagnostics through 124+ tools. It enables coding from mobile devices when a machine is set up.