</>MCP Agents Market
Plugin

magic-context

by cortexkit2kTypeScriptUpdated 2026-09-04

Unbounded context. Memory that manages itself. One session, for life. The hippocampus for coding agents, part of CortexKit.

Claude CodePiOh My Pi

Magic Context is a Claude Code plugin that provides unbounded, self-managing context and long-term memory for AI coding agents, enabling continuous sessions that never forget. It captures project knowledge automatically as conversations progress, consolidates memories through background dreamer agents, and recalls relevant information across sessions without manual intervention. The plugin eliminates context window compaction pauses by using a background historian that compresses old conversation history into tiered compartments, while maintaining a stable prompt cache. Compatible with OpenCode, Pi, and Oh My Pi (OMP) harnesses, it stores all project memories, constraints, and decisions in a shared SQLite database accessible across different coding environments.

Key Features

Automatic project memory capture from conversations without manual note-taking
Background historian that compresses conversation history into compartments without pausing the active session
Cache-aware context reduction that queues drops at safe moments to preserve prompt cache efficiency
Dreamer agents that run overnight to verify, curate, and consolidate memories against the current codebase
Cross-session and cross-harness memory recall with semantic search across conversations, git commits, and project notes
Temporal awareness with gap markers and dated history for time-based reasoning
Desktop application for browsing, editing, and managing memories outside the terminal
Support for local or remote embedding models with fallback to keyword search

Use Cases

  • 01Maintaining long-running development sessions across weeks or months without losing project context
  • 02Automatically building a knowledge base of architectural decisions, constraints, and coding conventions
  • 03Searching across past conversations and git history to recall why specific technical decisions were made
  • 04Running low-cost or local models for background memory tasks while keeping premium models for active coding
  • 05Sharing project knowledge between different AI coding environments (OpenCode, Pi, OMP)
  • 06Consolidating and verifying project memories overnight to keep documentation current with code changes

Related Plugins

View more

magic-context — FAQ

What is Magic Context and what does it do?+

Magic Context is a Claude Code plugin that gives AI coding agents persistent memory and self-managing context across sessions. It automatically captures project knowledge from conversations, compresses old history in the background, and recalls relevant information without manual intervention, enabling sessions that can run for months without forgetting.

How do I install Magic Context?+

Run the interactive setup wizard with `npx @cortexkit/magic-context@latest setup` on any OS, or use the curl/PowerShell one-liners for macOS/Linux/Windows. The wizard auto-detects your harnesses (OpenCode, Pi, OMP), configures the plugin, disables built-in compaction, and helps you select models for the historian and dreamer agents.

Which AI coding clients does Magic Context support?+

Magic Context works with OpenCode, Pi (version 0.74.0 or higher), and Oh My Pi/OMP (version 17.1.7 or higher). All three harnesses share the same SQLite database, so project memories and embeddings are accessible across all supported environments.

Do I need API keys or a specific model to use Magic Context?+

You must configure a historian model in your magic-context.jsonc config file (e.g., `historian.opencode.model`). You can use any provider/model combination your harness supports, including local models. The optional dreamer and embedding features can also use local models to minimize costs.

Is Magic Context free to use?+

Magic Context itself is MIT-licensed open source software. However, you'll incur costs for the AI models you configure for the historian and optional dreamer agents, unless you use fully local models.

Does Magic Context work with other context-management plugins?+

No, Magic Context disables itself if another context manager is detected to prevent conflicts. It automatically checks for OpenCode built-in compaction, OMP native compaction/memory, DCP, and oh-my-opencode overlapping features, and the setup wizard helps you resolve these conflicts.

How do I install magic-context?+

Open the source repository on GitHub and follow its README. magic-context is a plugin — MCP Agents Market links you directly to the official repo.

Is magic-context free?+

magic-context is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.

Related searches