Skip to content
gentic.news — AI News Intelligence Platform
Connecting to the Living Graph…

Listen to today's AI briefing

Daily podcast — 5 min, AI-narrated summary of top stories

Diagram showing MACCHA architecture with a central file-based memory system that multiple Claude Code agents read…
Open SourceScore: 95

MACCHA: The File-Based Cross-Agent Brain That Makes Claude Code Remember

MACCHA solves Claude Code's cold-start problem with a file-based 7-tier memory system. Use it to persist preferences, project rules, and lessons across sessions without a daemon.

·16h ago·4 min read··12 views·AI-Generated·Report error
Share:
Source: github.comvia hn_claude_code, gn_claude_code, reddit_claudeWidely Reported
How do I give Claude Code persistent memory across sessions without running a background daemon?

MACCHA is a lightweight file architecture that gives Claude Code persistent, shared memory across sessions and agents. It uses 7-tier markdown files with vector embeddings and confidence decay so every session starts with your full context — no daemon needed.

TL;DR

MACCHA gives Claude Code persistent memory across sessions via a 7-tier file architecture — no daemon, no cloud, no cold starts.

Key Takeaways

The .claude Folder: A 10-Minute Setup That Makes AI Code Smarter | by ...

  • MACCHA solves Claude Code's cold-start problem with a file-based 7-tier memory system.
  • Use it to persist preferences, project rules, and lessons across sessions without a daemon.

What Changed: Cross-Agent Persistent Memory Without a Daemon

Every Claude Code session starts from zero. You open a terminal, run claude, and it has no idea you prefer pnpm over npm, hate Tailwind, or spent three hours yesterday debugging a race condition in your WebSocket handler. You re-explain, re-prompt, re-teach.

MACCHA (Multi Agent Continuous Context Harness) eliminates this by giving Claude Code — and Antigravity, OpenCode, and any other local AI agent — a shared, persistent "brain" that lives in your file system. No cloud, no daemon, no 24/7 server. Just structured markdown files that any agent can read and write.

The architecture is simple: a ~/.maccha/ directory with a 7-tier context hierarchy:

  • core/: Your identity, preferences, and non-negotiable rules (e.g., "always use pnpm, never npm")
  • projects/: Per-project context including architecture decisions and constraints
  • sessions/: Recent session logs with key decisions and outcomes
  • knowledge/: Domain-specific knowledge, API docs, and patterns you've learned
  • tasks/: Current and pending tasks with status and dependencies
  • memory/: Working memory with vector embeddings, confidence decay, and semantic conflict detection (via Memanto)
  • archive/: Compressed historical context for reference

When Claude Code starts, MACCHA's init script populates the agent's context with the most relevant files from this hierarchy. When the session ends, a save script extracts key decisions, preferences, and lessons learned, updating the memory with confidence scores.

What It Means For You: No More Cold Starts

If you've used Claude Code for more than a week, you've experienced the frustration of re-teaching it your preferences. MACCHA makes that a one-time setup.

Concrete impact on your daily workflow:

  1. Zero re-explanation: Your first prompt of the day is as effective as your last prompt yesterday. Claude Code already knows your tech stack, coding style, and current task.

  2. Cross-project consistency: Set a preference in one project ("use pnpm"), and it applies everywhere. MACCHA's project-specific context also means you can have different rules for a React frontend vs. a Go backend.

  3. Multi-agent portability: Start a complex refactor in Antigravity, continue it in Claude Code. Both agents read from and write to the same MACCHA brain.

  4. No background overhead: Unlike Hermes Agent or OpenClaw, MACCHA doesn't run a daemon. It's just files. Your agent reads them when it starts, writes to them when it finishes. Zero CPU when you're not coding.

  5. Conflict-aware memory: MACCHA's Memanto engine detects semantic conflicts. If an older memory says "use endpoint v1" but your current codebase uses v2, it flags the conflict rather than silently applying outdated context.

Try It Now: Setting Up MACCHA for Claude Code

# Clone the repository
git clone https://github.com/KarelTestSpecial/real-agent-setup.git ~/.maccha

# Run the init script to create your profile
cd ~/.maccha && bash init.sh

# Add to your shell config to auto-load with Claude Code
echo 'export CLAUDE_CODE_PRE_INIT="source ~/.maccha/init.sh"' >> ~/.zshrc

Your first MACCHA session:

  1. Run claude as usual. MACCHA's init script will inject your core identity, current tasks, and relevant project context into the prompt.
  2. Work normally. When you finish, run maccha-save to persist new learnings and decisions.
  3. Next session: Claude Code loads your updated context. No re-explanation needed.

Customizing your profile:

Edit ~/.maccha/core/profile.md with your non-negotiable rules:

# Developer Profile
- Package manager: pnpm
- CSS: Dark mode, no Tailwind, use CSS modules
- Testing: Vitest with React Testing Library
- API style: REST over GraphQL unless specified
- Commit style: Conventional commits with emoji prefixes

These rules will be injected into every Claude Code session automatically.

The Forward Signal: What's Next for MACCHA

MACCHA is still early (4 points on HN, minimal community adoption), but the architecture solves a real problem that neither Anthropic nor any other AI agent vendor has addressed well. The file-based approach is elegant because it's tool-agnostic — it doesn't depend on Claude Code's API or any proprietary format.

Expect to see:

  • Community CLAUDE.md generators that convert MACCHA profiles into CLAUDE.md files for teams
  • MCP server integration so MACCHA can serve context via Model Context Protocol instead of file injection
  • Conflict resolution UIs for when multiple agents write conflicting memories

For now, MACCHA is a simple, powerful tool that makes Claude Code smarter the more you use it. Install it, teach it your preferences once, and never cold-start again.


Source: github.com

Sources cited in this article

  1. Profile
Source: gentic.news · · author= · citation.json

AI-assisted reporting. Generated by gentic.news from 1 verified source, fact-checked against the Living Graph of 4,300+ entities. Edited by Ala SMITH.

Following this story?

Get a weekly digest with AI predictions, trends, and analysis — free.

AI Analysis

Claude Code users should immediately adopt MACCHA to eliminate the cold-start problem. The key workflow change: instead of starting every session with a long system prompt re-explaining your preferences, let MACCHA inject that context automatically. Add `source ~/.maccha/init.sh` to your shell config so every `claude` invocation loads your persistent profile. Second, use MACCHA's per-project context to maintain separate rules for different codebases. Your React project gets React-specific context; your Go service gets Go-specific context. MACCHA's hierarchy handles this automatically when you run `init` from within a project directory. Finally, adopt the `maccha-save` habit. After every Claude Code session, run it to persist new learnings. Over a week, your agent will accumulate a rich, personalized knowledge base that makes every subsequent session faster and more accurate. This compounds — the more you use MACCHA, the better Claude Code performs.
Compare side-by-side
Claude Code vs MACCHA

Mentioned in this article

Enjoyed this article?
Share:

AI Toolslive

Five one-click lenses on this article. Cached for 24h.

Pick a tool above to generate an instant lens on this article.

Related Articles

From the lab

The framework underneath this story

Every article on this site sits on top of one engine and one framework — both built by the lab.

More in Open Source

View all