# opencode-magic-context

> OpenCode plugin for Magic Context — cache-aware infinite context, cross-session memory, and background history compression for AI coding agents

- **URL**: https://www.freshcrate.ai/projects/opencode-magic-context
- **Author**: cortexkit
- **Category**: Frameworks
- **Latest version**: `dashboard-v0.5.1` (2026-06-03)
- **License**: MIT
- **Source**: https://github.com/cortexkit/opencode-magic-context
- **Language**: TypeScript
- **GitHub**: 227 stars, 12 forks
- **Registry**: github
- **Tags**: `agent-context`, `agent-framework`, `agent-memory`, `ai`, `ai-agents`, `ai-context`, `ai-memory`, `cache-aware`, `typescript`

## Description

OpenCode plugin for Magic Context — cache-aware infinite context, cross-session memory, and background history compression for AI coding agents

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `dashboard-v0.5.1` | 2026-06-03 | High | # Dashboard v0.5.1  A small patch release.  ## What's Fixed  - **No more console-window flashes on Windows.** Opening the dashboard spawned a child process for `git` (once per project while resolving identities) plus `opencode`/`pi` probes, each flashing a terminal window — easily a dozen or more on startup. All child spawns now use `CREATE_NO_WINDOW` on Windows (no-op on macOS/Linux). (#115)  ## What's New  - **NVIDIA NIM support in Test Connection.** The embedding connection test now reads `in |
| `v0.21.8` | 2026-05-22 | High | # v0.21.8 — See how much work Magic Context is doing for you  ## What's New  - **Total tokens metric, per session.** The TUI sidebar and the dashboard's session Meta tab now show a "Total tokens" number: the cumulative prompt size Magic Context has processed for this session over its lifetime, summed across every turn. It's the simplest way to see how much aggregate context Magic Context has been managing without having to read the live percentage on every turn.  - **Per-historian-run cost visib |
| `v0.21.0` | 2026-05-17 | High | # v0.21.0 — Cache-stable reminders and per-project embeddings  ## What's new  ### Note nudges and auto-search hints are now cache-stable  Both reminder types append a small block to a recent user message. Previously the plugin remembered only the *latest* sticky anchor per session, so the next new reminder rewrote the old anchor's bytes on the wire, busting the prompt cache prefix for everything past it. Auto-search hints were worse: they lived only in process memory and disappeared entirely on |
| `v0.18.0` | 2026-05-11 | High | ## What's new  ### Synthetic todowrite for todo retention across context cleanup  Magic Context aggressively drops old tool calls and results from the conversation prefix to save tokens. Helpful for token economy, harmful for agents that use `todowrite` as a planning scratchpad — once the original `todowrite` tool calls age out, the model effectively forgets its plan even though the real state is still tracked in OpenCode's internal todo registry.  This release adds a deterministic, cache- |
| `v0.16.2` | 2026-05-04 | High | ## System prompt control + cross-host dreamer fixes  This release adds per-agent control over Magic Context's system-prompt injection, fixes a long-standing bug where the dreamer queue could leak across projects, and stops historian/dreamer/sidekick subagent prompts from rendering as huge visible messages in the TUI.  ## What's New  - **Per-agent opt-out for system-prompt injection** ([#53](https://github.com/cortexkit/magic-context/issues/53), [#42](https://github.com/cortexkit/magic-context/is |
| `v0.15.7` | 2026-04-28 | High | ## What's Fixed  - **Tagger no longer cascades into repeated cache busts** when its internal counter drifts behind the tags table's actual max tag number. Previously, once divergence occurred (from earlier outer-transaction rollback, multi-process race, or non-monotonic counter upsert), every transform pass would propose an already-claimed tag number, hit a UNIQUE collision, abort tagging, and skip the persisted-drop / reasoning-clear / caveman-compression replay — resurrecting tens of thousands |
| `v0.15.2` | 2026-04-24 | High | # v0.15.2  Five focused fixes since v0.15.1 — a malformed-tag-prefix repair, memory hardening, and audit-driven polish.  ## 🧹 Malformed `§N">§` tag prefixes now self-heal  After `experimental.temporal_awareness` shipped in v0.13, some models started emitting garbled tag prefixes at the start of their own assistant text:  ``` §15298">§15298§ Confirmed — every OpenCode restart… §15434">§ Type mismatch: m.file.as_path() returns ... ```  Root cause was token-level confusion: adding `start-date` and |
| `v0.13.2` | 2026-04-21 | High | ## 🐛 Bug Fixes  **Compressor — prevent depth cascade on old compartments** The compressor's selection algorithm previously scanned oldest→newest and picked the first contiguous same-depth run it found. This caused the same raw-ordinal range to be re-selected pass after pass, rapidly deepening a small prefix (e.g. seq 0-3) all the way to depth 5 (caveman — title-only collapse with empty content) within hours, while the rest of the history remained at depth 0.  The new algorithm iterates distinct |
| `v0.13.1` | 2026-04-21 | High | ## 🐛 Bug fix  ### `curl \| bash` installer: historian model picker frozen  The one-line installer (`curl -fsSL ... \| bash`) could freeze on the historian model selection screen — arrow keys did nothing, ctrl+c didn't exit — forcing users to kill the terminal and fall back to running `bunx --bun @cortexkit/opencode-magic-context@latest setup` directly.  **Root cause:** a regression in `scripts/install.sh` (v0.12.x) added `--bun` to the bunx invocation, which forced the setup CLI to run under Bun |
| `dashboard-v0.3.0` | 2026-04-21 | High | ## ✨ Highlights  ### Bulk memory management (closes #28)  The Memory Browser now handles batch operations properly.  - **Per-item checkboxes** on every memory - **Per-category tri-state checkboxes** (all / some / none) to select a whole category at once - **Select-all-visible** sticky control at the top - **Bulk archive** — reversible, archives a batch in one SQL transaction - **Bulk delete** — destructive, requires a native confirm dialog - **Collapsible category groups** with right-side chevro |

## Citation

- HTML: https://www.freshcrate.ai/projects/opencode-magic-context
- Markdown: https://www.freshcrate.ai/projects/opencode-magic-context.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/opencode-magic-context/deps

_Generated by freshcrate.ai. Indexes github releases for AI-agent ecosystem packages._
