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

Claude Code Adds Remote Control Feature for Mobile Session Management
Claude Code now allows developers to start tasks in their terminal and continue controlling sessions from mobile devices via the Claude app or claude.ai/code while Claude runs locally on their machine.

HostMyClaudeHTML: One-Click Sharing for Claude HTML Artifacts
A developer built hostmyclaudehtml.com, a free tool that lets you share Claude-generated HTML artifacts as live URLs by dragging and dropping the .html file. No account is required for uploaders or viewers.

OpenClaw Plugin Connects AI Agents to Meshtastic Radio Mesh for Off-Grid Operation
A new open-source plugin bridges the OpenClaw framework with Meshtastic's LoRa radio mesh network, enabling AI conversations, API queries, and device control without internet or cellular connectivity.

OpenClaw Claude Extension Updated to Use Agent SDK After Anthropic Billing Changes
An OpenClaw extension developer rewrote their Claude CLI integration to use the official claude-agent-sdk after Anthropic started detecting and reclassifying CLI usage as third-party app usage, which bills against a separate credit pool instead of Max plan limits. The SDK approach authenticates through existing Claude Code login and bills as regular Max plan usage.