Skip to content

Context Repositories: Git-based Memory for Coding Agents Fresh

Published: February 12, 2026 | Original Post


A rebuilt memory system using programmatic context management and git-based versioning.

Key Innovations

Git-Backed Memory Storage

The system automatically versions every memory change with informative commit messages. This enables concurrent, collaborative work across multiple subagents that can manage divergence through standard git operations.

Local Filesystem Approach

Agents store memory as files in their local filesystem, enabling them to use standard Unix tools and bash commands for complex memory queries. Files are simple, universal primitives that both humans and agents can work with.

Progressive Disclosure

Memory files use a structured hierarchy with frontmatter descriptions. A designated system/ directory controls which files are always loaded into context, and agents can reorganize their own memory structure as they learn.

Multi-Agent Capabilities

Context Repositories enable memory swarms where multiple subagents can work concurrently in isolated git worktrees, then merge their learned findings back into shared memory. This supports divide-and-conquer strategies that spread processing across subagents.

Built-in Memory Skills

  • Memory initialization -- Uses concurrent subagents to bootstrap new agents
  • Memory reflection -- Background processes periodically review and persist important information
  • Memory defragmentation -- Reorganizes memory over time, maintaining 15-25 focused files

Getting Started

Enable the feature via the /memfs command, which detaches existing memory tools and syncs memory blocks to a git-backed filesystem.

bash
npm install -g @letta-ai/letta-code