Releases: cortexkit/magic-context
Release list
v0.29.0
v0.29.0
Adds smart drops (opt-in): content-aware reclaim that frees more context on long, edit-heavy sessions by dropping tool output a later call has made obsolete, instead of only the oldest output. Also stops the nightly docs maintainer from flattening hand-written ARCHITECTURE.md / STRUCTURE.md, and unifies commit detection so its three call sites can't drift apart.
Features
-
smart_drops: reclaim superseded tool output, not just the oldest (opt-in, default off). The normal auto-drop reclaims the oldest tool outputs first when a session gets long. Smart drops adds reclaim by supersession: output that a later call has made obsolete, regardless of age:- Superseded edits are the big one. When you edit the same file more than once, the older edits' full diffs are dead weight, but dropping them entirely loses the record that the file was touched. Smart drops keeps the newest edit in full and compresses each older edit to a marker that preserves its
filePathand a short hint of the region, so the agent still sees which file and region it changed. - Spent control-plane output: older
todowritesnapshots (the live task list is kept), olderctx_reducecalls (the most recent few are kept), and zero-value status output (bash_status,bash_kill,ctx_notereads) are dropped once superseded.
It only ever acts during a transform pass that is already rewriting the message array, so it never causes a prompt-cache miss on its own, and every drop uses the same deterministic placeholder as the normal drops so cached turns stay byte-identical. When
smart_dropsis off (the default), the messages sent to the model are byte-for-byte identical to previous versions: the whole feature is inert until you turn it on. Enable it with"smart_drops": true(it's also a toggle in the dashboard's Advanced config). It's experimental and stays off by default while cache stability is validated in the wild; if you run long, edit-heavy sessions and want to reclaim more context, it's worth turning on. One note: once enabled, every binary that shares your Magic Context database (multiple OpenCode instances, or OpenCode + Pi) should be on this release or newer. - Superseded edits are the big one. When you edit the same file more than once, the older edits' full diffs are dead weight, but dropping them entirely loses the record that the file was touched. Smart drops keeps the newest edit in full and compresses each older edit to a marker that preserves its
Fixes
-
The nightly docs maintainer no longer flattens hand-written architecture docs. The
maintain-docsdreamer task was rewriting dense, hand-authoredARCHITECTURE.md/STRUCTURE.mdinto its generic boilerplate template, dropping hard-won detail (invariants, edge cases, subsystem specifics) even though only a few sections had actually drifted. It now treats an existing doc as the source of truth for shape: it makes the smallest edits that re-sync the changed sections with the code and preserves the existing structure, depth, and voice, rather than regenerating the whole file. The creation-from-scratch templates are unchanged. -
Commit detection unified across its three call sites. The historian's commit-cluster trigger, the note-nudge "a commit just happened" boundary, and the Pi note detector each carried their own hash + keyword patterns that had quietly drifted apart (different hash lengths, different keyword sets). They now share one definition, so a commit is recognized consistently everywhere.
-
With
memory.enabled: false, thectx_memorytool and its guidance are no longer presented. Previously, even with memory off, the agent was still given thectx_memorytool and told to "save to memory proactively", but with memory off the<project-memory>block is never injected, so anything it wrote could never resurface, making those writes silent busywork. The tool and all its guidance are now omitted when memory is off.ctx_searchstays available (it still searches your conversation history and indexed git commits, just not memories). -
Fixed a crash in the WASM sandbox that runs compiled smart-note checks. When two projects' nightly smart-note sweeps overlapped (common at multi-project startup), the shared sandbox could throw
QuickJSUseAfterFree: Lifetime not aliveand fail the check. Sandbox runs are now serialized, so a check that pauses for a file read or network request can no longer corrupt a concurrent one. -
Pi: the
ctx_memorytool now stays consistent when you switch projects. In a single Pi session that moves between projects (one with memory enabled, one without), the tool could end up registered for the wrong project's setting. It is now always registered and gates per-project at call time, matching what the prompt advertises for the current project.
Docs
- Added Chinese (Simplified & Traditional), Korean, and German README translations.
Dashboard dashboard-v0.8.1
Dashboard v0.8.1
A focused fix release: the embedding Test Connection button now works for the two setups it was wrongly rejecting, plus a couple of smaller config and discovery fixes.
Fixes
-
Test Connection (user config) now works with
{file:...}/{env:...}keys. If your user-levelembedding.api_keyused a{file:~/...key}or{env:VAR}reference (the recommended way to keep secrets out of the config file), Test Connection refused it with a confusing message about an environment variable not being set, even for file references. It now resolves these tokens exactly like the plugin does at runtime, so the test uses your real key. Unresolved references (a missing file, or an env var the desktop app didn't inherit) are reported with accurate, kind-specific guidance, and a{file:...}that points into a credential directory (~/.ssh,~/.aws,~/.gnupg,~/.config/gh) is refused on purpose, including via..traversal or symlinks. -
Test Connection now accepts
http://and local endpoints. A self-hosted embedding server athttp://127.0.0.1:1234/v1(LM Studio, Ollama, llama.cpp, and similar) was rejected with "Endpoint must start with http:// or https://" even though it clearly did, because the check was HTTPS-only. Bothhttp://andhttps://are now accepted, and loopback / private-LAN addresses are allowed so local servers can be tested. Cloud instance-metadata addresses stay blocked. -
Test Connection is limited to user config. The embedding section (provider, endpoint, API key, and the Test button) is now hidden when editing a project config. Project configs are shared repository files, and the plugin already ignores an embedding endpoint set there, so testing one was both pointless and a way for a shared repo to direct a key at an arbitrary endpoint. Embedding setup stays in your user config; project configs keep their own settings (like the per-project memory toggles).
-
Model discovery no longer spins up unrelated daemons. The config page's model dropdowns run
opencode --pure models, so opening the page no longer boots other OpenCode plugins (and the background processes some of them spawn).
Config editor
- New
languagefield ("Output Language") in the config editor, matching plugin v0.28.0+: set a 2-letter ISO 639-1 code (e.g.tr,es,de,ja) to keep Magic Context's generated prose in your language; leave it blank for today's behavior. - New
smart_dropstoggle in Advanced config, matching plugin v0.29.0.
Compatibility
Pair this dashboard with plugin v0.29.0 for the smart_drops toggle and the matching config schema. The language field works with plugin v0.28.0 and newer.
v0.28.0
v0.28.0
Adds a language option so non-English sessions stay in your language instead of drifting back to English, and fixes the ctx_reduce reminder so it reflects how much is actually reclaimable rather than just how close you are to compaction.
Features
language: keep generated text in your language (#192). All of Magic Context's generated prose (historian summaries, dreamer memories, primers, the sidekick) and its guidance was English-only, so long non-English sessions slowly drifted back toward English. Set a top-levellanguageto a 2-letter ISO 639-1 code (for example"language": "tr"or"language": "es") and Magic Context writes its prose in that language while keeping everything structural in English exactly as before: XML tags, JSON keys, the memory category names, tool names, code, file paths, and transcript markers. Memory migration is deliberately language-preserving: turning the option on does not translate memories you already have, it only changes the language of newly written text. The option is user-level only (a project config cannot set it), defaults to off, and when unset the output is byte-for-byte identical to previous versions.
Fixes
-
The
ctx_reducereminder no longer jumps to "urgent" just because you are near compaction. The reminder's severity multiplied the reclaimable share by a pressure term, and because of how that term was defined it effectively counted pressure twice and was unbounded past the execute threshold. The result: once a tool-heavy session approached compaction, the reminder escalated straight to its most urgent wording regardless of how much was actually reclaimable. Pressure is now a gate (the reminder only fires once you are genuinely close to compaction), and the level reflects the real reclaimable share: roughly a fifth of your live input being unreduced tool output is a gentle mention, around two fifths is firmer, and only a clear majority is urgent. -
The reminder no longer suggests dropping the agent's task list or trivially small outputs. The hint of what could be reclaimed picked the oldest tool outputs with no regard for kind or size, so it could point the agent at its own
todowritetask list (never a useful thing to drop) or at tiny control-plane calls (a 30-token status line) that reclaim nothing. It now skipstodowriteand anything below a small token floor, surfacing only outputs whose removal actually frees meaningful space.
v0.27.3
v0.27.3
Patch release: prevents a hard context-overflow when switching from a large-context model to a smaller one mid-session, stops the dashboard from spawning a background indexer daemon, and includes sidebar polish plus the badge/schema-fence fixes queued from the v0.27.2 window.
Fixes
-
Switching to a smaller-context model mid-session no longer overflows the first request (#188). If you switched from a large-context model (say 512k) to a smaller one (say 272k) while the session already held more history than the new model's window, the first request was sent oversized and rejected by the provider, and recovery only kicked in one turn later. Root cause was a model-resolution bug: on the switching turn the transform read the model off the last assistant message (still the old model) instead of the new model you actually selected, so the whole pass sized history against the old, larger limit. Magic Context now resolves the outgoing model correctly, clears the previous model's stale limit/pressure state, and proactively compacts before the first request when the carried history would not fit, so the switch is seamless instead of erroring once.
-
Opening the dashboard no longer spawns a background indexer daemon. The dashboard runs
opencode modelsto populate its model pickers, which booted the full OpenCode runtime including external plugins and could leave a high-CPU indexer process orphaned after the short-lived discovery call exited. It now runsopencode --pure models, which skips external plugins while keeping built-in auth. -
Sidebar header badge stays readable and no longer renders heavy black text. The transparent-theme fix from the v0.27.2 window (#186) derived the badge label color from the accent, but its threshold flipped ordinary mid-tone accents (a typical orange/amber) to black, which looked heavy and clashed with neighboring badges. The label now stays white across the normal range of accent colors and only switches to black on genuinely light/pale accents, while remaining safe on transparent themes.
-
Sidebar slot now sits higher by default. The Magic Context sidebar slot's default sort order moved up so it renders above the AFT slot out of the box. You can still set your own
order(orforceToTop) intui-preferences.jsonc. -
Clearer schema-fence guidance (#185). When a database written by a newer plugin version is opened by an older one, the message now points you at
doctor --forceas the remedy.
Docs
- Corrected the README's "existing project" section and rewrote the dashboard reference page to match the current project-centric dashboard layout (Projects with Sessions/Memories/Dreamer/Primers, Workspaces, Cache, User Directives, Config, Logs).
v0.27.2
v0.27.2
Patch release: fixes a TUI sidebar that fails to load on OpenCode 1.17.10, a config-migration edge case that could leave you running on defaults, and a context-limit misreport on OpenAI OAuth models. Also includes the two fixes already queued from v0.27.1's window (#176, #177).
Fixes
-
TUI sidebar loads again on OpenCode 1.17.10. OpenCode 1.17.10 bumped its TUI runtime (OpenTUI) to 0.4.2. The Magic Context sidebar ships as raw TSX that compiles against OpenTUI's JSX runtime, but the plugin didn't declare
@opentui/solid/solid-jsas dependencies, so on 1.17.10 the sidebar failed to load withCannot find module '@opentui/solid/jsx-dev-runtime'. Those runtime dependencies are now declared (pinned to the versions the host ships), and a CI smoke test imports the TUI entry the way OpenCode loads it so this can't silently regress again. -
Config migration no longer moves your user config when you open OpenCode inside the config directory. The v0.27.0 config-location migration moves a legacy config into the shared CortexKit location. If you happened to open OpenCode with its working directory set to the config home itself (
~/.config/cortexkit), the project-scope migration treated your user config as a project config, moved it into a.cortexkit/subfolder, and renamed the original aside, leaving Magic Context running on default settings until you noticed. The migration now never treats a user-scope config as a project source. No data was lost by the original behavior (the file's contents were preserved), but the active config path could go empty. -
Context limit no longer misreported for OpenAI OAuth models (e.g. gpt-5.5). Magic Context reads each model's prompt limit from OpenCode's resolved provider config. That limit is auth-dependent: on OpenAI OAuth, gpt-5.5's input cap is 272k, not the catalog's 922k. If the limit cache warmed up before your provider auth finished loading, it could cache and persist the raw 922k, and because the existing recovery only corrects a limit that's too low, a too-high value never self-corrected, so the sidebar showed plenty of headroom while the backend rejected the request. The limit cache now re-warms once, after a successful response proves auth is live, replacing any stale pre-auth value with the real one.
-
Pi spawns correctly on Windows (#177). Pi subagents now spawn through the running Node executable instead of a bare
picommand, which failed on Windows. The spawn path is also shell-free, so prompt text is never passed throughcmd.exe. -
Fresh installs default to
.jsoncconfig (#176). New installs now writemagic-context.jsoncinstead oftui.json.
v0.27.1
v0.27.1
Patch release: fixes a first-run setup crash introduced in v0.27.0, and stops the diagnostic log from masking token counts.
Fixes
-
Setup no longer crashes on a fresh machine. v0.27.0 moved configuration to the shared CortexKit location (
~/.config/cortexkit/magic-context.jsonc), but on a brand-new install that directory does not exist yet, and the setup wizard tried to write the config without creating it first, so the run ended inENOENT: ... magic-context.jsonc.tmp. The atomic-write helper now creates the parent directory before writing, so the very firstsetupcompletes cleanly. If you hit this on v0.27.0, update and re-runnpx @cortexkit/magic-context@latest setup. -
Token counts stay readable in the log. Diagnostic log lines like
tokens.input=45000andhasUsageTokens=truewere being rewritten to<REDACTED>because the secret redactor matched on the word "token" in the key name. A real key, token, or password is always a high-entropy string, never a bare number or boolean, so numeric and boolean values are now left as-is. Actual secrets (bearer tokens, JWTs, API keys) are still redacted by their value shape regardless of the key name, so nothing sensitive leaks. This also applies to the log tail indoctor --issuereports.
v0.27.0
v0.27.0: Dreamer V2, Primers, and the CortexKit config move
The biggest release since the V2 historian. The background dreamer is rebuilt into independently-scheduled tasks, two new memory capabilities ship (Primers and friction-learning), embedding storage stops throwing away your vectors on a config change, and configuration moves to a shared CortexKit location. Plus a deep correctness, security, and cross-harness hardening pass.
Dreamer V2: per-task scheduling
The dreamer is no longer one monolithic nightly run. Each maintenance task has its own cron schedule and its own model, configurable in the setup wizard, the dashboard, or magic-context.jsonc:
"dreamer": {
"tasks": {
"verify": { "schedule": "0 3 * * *" },
"curate": { "schedule": "0 4 * * 0" },
"classify-memories": { "schedule": "0 6 * * *" },
"retrospective": { "schedule": "0 5 * * *" },
"maintain-docs": { "schedule": "" }
}
}Point a lightweight model at the routine tasks and a stronger one at just the task that needs it. Set a schedule to "" to turn a task off. Every dreamer task is cache-safe by design: it never busts your prompt cache, no matter when it runs.
Each task now also runs with a dedicated prompt and a least-privilege toolset, so a memory-classification pass can't read files and a docs pass can't touch memory.
New: memory importance scoring (classify-memories)
Scores each memory's importance by blending how durable the fact is with what your project is actively working on, plus its scope and whether it is safe to share with teammates. When the injected memory block is over budget, the most relevant memories stay in context and the least relevant drop first (they remain fully searchable via ctx_search). Runs in the background, completely cache-neutral.
New: learning from friction (retrospective)
Learns from the moments you had to correct or re-explain something and records the durable lesson as a project memory, so the same friction does not recur. It is cheap by default: it only does real work when a cheap pass detects a genuine correction pattern, and it reads only your own typed messages (never tool output or other content), with the learning distilled into a third-person rule rather than your raw words. On by default; turn it off anytime.
New: Primers
Primers are durable, standing answers to the questions that keep coming up about how your project works ("how does the transform pipeline stay cache-stable?", "where does session state live?"). The historian notices when the same question recurs across days and promotes it to a Primer; the dreamer then keeps the answer current by investigating the actual code (an open-book read of the relevant files), not by re-summarizing what is already in context. Stale Primers sink out of the render budget over time but stay in the database.
Smart notes that check their own condition, cheaply
A smart note (ctx_note with a surface_condition) resurfaces when its condition becomes true. Until now the dreamer re-checked that condition by asking an LLM every single time it ran, all the way up until the condition was finally met. For something like "resurface when PR #42 is merged," that meant paying for a full model call on every check, possibly for days.
Now, for a deterministic condition like a GitHub PR being merged, a release tag being published, or a file appearing on disk, the dreamer writes a small reusable check once and then simply runs that script on each cycle. The repeated, open-ended LLM evaluation becomes a cheap, deterministic run that verifies the real-world signal (PR state, release tag, file contents) and surfaces the note at the right moment. The script runs in a locked-down WASM sandbox with a read-only, SSRF-guarded capability API, so a note's condition can safely reach out to check the world without ever touching anything it should not.
Memory maintenance, split so neither task starves
The old combined memory task is now focused tasks:
- verify checks memories against their backing files and fixes or removes stale ones, but only when those files actually changed (a one-time map-memories backfill records which files back which memory).
- verify-broad periodically re-checks the whole pool to catch drift.
- curate deduplicates, tightens, and prunes. Cross-category merges are now structurally rejected: a memory has exactly one category.
Beyond the split, every dreamer task was re-tooled to do more with less. Each task now gets a focused prompt and only the tools it needs, and the heaviest passes (classify, verify) were reworked to emit a single structured result instead of grinding through many small tool calls. The result is noticeably fewer tokens per run for better, more consistent output, which matters most if you point the dreamer at a paid model.
Embedding storage no longer wipes your vectors on a config change
Previously, changing your embedding model or endpoint could trigger a full, destructive re-embed of every memory, commit, and history chunk. Now vectors for different models coexist in storage, keyed per model. Switching providers (or testing one) keeps your existing vectors intact; the old set is garbage-collected lazily and only once a trusted new config has registered. A degraded or mid-migration config never drives deletion. Also adds a guard that refuses vectors when an endpoint silently serves a different model than requested (wrong-dimension corruption), and supports asymmetric query/passage input_type.
Configuration moves to a shared CortexKit location
Magic Context configuration now lives in one shared place per machine instead of per-harness:
- User config:
~/.config/cortexkit/magic-context.jsonc - Project config:
<project>/.cortexkit/magic-context.jsonc
This is automatic. On first run after upgrading, your existing magic-context.jsonc (from the OpenCode or Pi location) is moved to the new path, and the old file is renamed to *.MOVED_READPLEASE with a short note inside so nothing is silently left behind. If the migrator finds two legacy files that disagree, it refuses to merge them and asks you to consolidate (it never clobbers your settings). Project-local runtime artifacts (historian error dumps) move under <project>/.cortexkit/magic-context/, and a scoped .gitignore keeps them out of your repo.
Workspaces: selective memory sharing
Workspace members can now share memory by category rather than all-or-nothing. Toggle which of the five categories cross into sibling projects (defaults to sharing only CONSTRAINTS), so global truths travel while project-local controls stay private.
Reliability and hardening
- Plugin-load resilience. The plugin entry is hardened against an OpenCode Desktop multi-instance boot-order issue that could leave the transform disabled and balloon a session's context. A failure registering hidden agents can no longer take down the whole plugin.
/ctx-*commands no longer leak an error into the TUI or log on OpenCode 1.17.x. The handled-command signal is now a clean 204 response.- Resilient dreamer leases. Transient database contention during a long task no longer aborts it as a permanent failure, and a genuine multi-minute stall is detected correctly instead of risking a split-brain run.
- A multi-wave correctness and security review across storage permissions, config recovery, the embedding pipeline, the dashboard backend, SSRF guards, and migration safety. Storage directories are tightened to
0700/0600. toast_duration_ms: 0now disables Magic Context toasts entirely.
Thanks to our contributors
This release includes community contributions from:
- @kecsap: a configurable toast duration, including
toast_duration_ms: 0to turn Magic Context toasts off entirely (#92). - @tracycam: security hardening, including tighter storage-directory permissions, SQLite
ATTACHpath escaping, and project-config privilege fixes (#143).
Thanks also to everyone who filed detailed bug reports, and to Dependabot for the dependency bumps (#170, #171).
Upgrading
Upgrading is automatic. Your dreamer config is migrated to the new per-task schema in place, your configuration file is moved to the CortexKit location, and the database migrates to schema v49 on first load. No manual steps.
Dashboard dashboard-v0.8.0
Dashboard v0.8.0
A major dashboard release that reorganizes everything around your projects, ships the full Dreamer V2 control surface, adds Primers, and brings the config and embedding changes from plugin v0.27.0 to the desktop app.
Project-centric navigation
The dashboard is now organized around projects instead of scattered global lists. The sidebar is Projects, Workspaces, Cache, User Directives, Config, Logs.
- Projects is a searchable card grid sorted by recent activity. Each card shows session and memory counts, the workspace it belongs to (if any), active harness badges (OpenCode / Pi), and when it was last active.
- Open a project to get Sessions, Memories, Dreamer, and Primers as tabs scoped to that project. The old global Memories, Sessions, Dreamer, and Primers pages are gone; you reach each through its project, so you are always looking at one project's data with no cross-project noise.
Dreamer V2 control surface
The Dreamer page is rebuilt for the new per-task model (plugin v0.27.0):
- A project-card grid with a collapsible task list per project, each task showing its schedule and a last-run traffic light (hover for detail).
- Per-project configuration via a gear button: edit a project's dreamer tasks in a focused modal that writes a per-project override, with a clear "inherited from global" indicator and a one-click revert.
- A redesigned task list as cards with inline icons and on/off toggles, an error panel when a run fails, and a flat run-history table (started, task, status, duration, tokens, memory changes).
- A cron picker that actually works: presets (nightly, weekly, hourly), a custom-cron escape hatch with validation, and a human-readable explanation ("Every day at 3am").
New: Primers
A Primers tab surfaces each project's durable standing answers (the recurring "how does X work?" questions the dreamer keeps current by reading the code), with their freshness.
Memory classification
The Memory browser now shows each memory's importance (as a band-colored pill) plus scope and shareability when they differ from the defaults, so you can see at a glance what the dreamer considers load-bearing.
Workspaces: selective memory sharing
The Workspaces panel lets you share memory by category across member projects (toggle which of the five categories cross over, defaulting to CONSTRAINTS only), with a staged Save / Discard so a batch of changes commits as one.
Cache Diagnostics improvements
- The Cache Hit Timeline scales each bar to the model's context window and segments by context-window changes, so a 1M-token model and a 256k model are never measured against the same axis.
- A redesigned, provider-agnostic cache health metric (no longer relying on cache-write data only some providers report), with an explicit UNKNOWN state for providers that report no cache accounting.
- The per-session view colors the compartment strip by importance instead of an arbitrary rainbow.
- Fixes a case where the timeline fragmented into one segment per step for sessions without a recorded context limit (e.g. background subagents); these now render on one stable scale.
Configuration moves to the CortexKit location
Matching plugin v0.27.0, the dashboard reads configuration from the shared CortexKit location (~/.config/cortexkit/ and <project>/.cortexkit/). The OpenCode and Pi config tabs are collapsed into a single User Config tab. Edits preserve your comments and untouched keys (the editor aborts a save rather than dropping them on a parse error), and config writes are hardened against symlink and path-escape attacks.
Reliability and correctness
- Archived OpenCode sessions no longer appear in session lists or inflate project session counts.
- Deleted worktree projects (leftover
bg_<hash>directories from background tasks) no longer show up as their own project cards. dir:<hash>projects now resolve to their real directory name instead of an opaque hash.- The dashboard degrades gracefully on older databases: it opens read-only, never creates or migrates tables, and falls back to sensible defaults when a column or table is missing rather than erroring.
- Robust memory-embedding queries for the new per-model embedding coexistence (plugin v0.27.0), and a fix for UTF-8 paths and string values in config parsing.
- Windows and version-manager (mise / asdf / volta) model-dropdown discovery via a login-shell PATH fallback.
Upgrading
Download the build for your platform below. The dashboard is read-only against your Magic Context database, so it is safe to run alongside any plugin version; it degrades gracefully if your database predates plugin v0.27.0.
v0.26.0
v0.26.0
A performance release for large, long-running sessions: per-message transform overhead is at least 2× lower on typical passes, and up to ~10× lower on the heavy ones (when history summarization fires). Also removes a source of confusing "model not found" errors by dropping the built-in model fallback chain, fixes prompt-cache and Anthropic thinking-block issues, and folds in three community fixes.
Faster on large sessions
Every message you send runs Magic Context's transform, and on very large sessions (hundreds of thousands to millions of tokens) several steps in that path were scaling with the whole session instead of just the live tail. They've been scoped to read only the part that can actually change. Measured on a real ~2M-token session, the typical per-pass transform cost roughly halved (median ~220 ms → ~95 ms), and the worst passes improved far more.
- The summarization trigger and message-tagging now read only the live conversation tail, not the entire tag history. On that session this cut the trigger's per-pass cost from ~70 ms to low single digits and tagging from ~38 ms to well under a millisecond.
- When history summarization actually fires, it no longer blocks the turn while it gathers and prepares its input — that preparation read raw history straight off disk on the main path and could stall a large session for several seconds before the model even started responding. It now reads only the tail it needs (~9.6 s → ~150 ms on that session).
Net effect: noticeably less lag per message on big sessions, and no multi-second pause when summarization kicks in.
No more surprise models: the built-in fallback chain is gone
The historian and dreamer agents had a built-in fallback chain — a hardcoded list of models across several providers, tried automatically when the configured model failed. If you only have one provider, every entry in that chain was a "model not found", producing a burst of confusing errors (e.g. Model not found: opencode/gemini-3.1-pro for someone who never configured Gemini).
Fallbacks are now only what you configure. If a hidden agent's model fails, Magic Context tries the fallback_models you set for it (if any) — never a model you don't have. The historian additionally falls back to your active session model as a last resort; with nothing configured, a failing model just retries cleanly instead of cascading through providers you've never used.
To make a genuinely failing model visible, doctor now has a Historian runs section that records every summarization run (success / failure / no-op) and is never reset — so a "fails several times, then succeeds" pattern is no longer hidden by a counter that clears on every success.
Anthropic thinking-block & prompt-cache fixes
- Stale "[cleared]" thinking blocks. When Magic Context clears the text of an old reasoning/thinking block to save space, it could leave a
[cleared]placeholder paired with the block's original cryptographic signature — a content/signature mismatch that some Anthropic-family routes (direct Claude, Bedrock-Claude, proxied Claude) can reject. Clearing is now safe on every provider: on canonical Anthropic the block is dropped before the wire, on other OpenCode providers the reasoning is left untouched, and on Pi the block is emptied so the serializer drops it. The latest turn's reasoning is never touched on either harness. (#162) - Fewer prompt-cache busts. A hard cache rebuild (model switch, idle timeout, memory change) now also drains any pending content drops in the same pass, instead of forcing a second rebuild a turn later. And a compartment with no embeddable raw text (e.g. a tool-only span) no longer loops the background embedder forever on Desktop.
Community fixes
- TUI crash on the recompile/upgrade progress panel (#168). A reactive race could dereference a momentarily-null progress value and crash the TUI. Fixed. (Thanks @jiuxingwang.)
historian.disallowed_toolsfor weak models (#166). Some weak instruction-following models get stuck in tool-calling loops when tool definitions are present. You can now strip tools from the historian's request (["*"]removes all); the historian gets its full prompt inline and doesn't need them. (Thanks @tobwen.)- Pi-only
thinking_levelleaking into OpenCode agent config (#167). It's now stripped from all three hidden agents. (Thanks @tobwen.)
Also in this release
doctor migrate-session— re-home a session to another project. A new interactive command to move a session (and, optionally, the memories it created) from one project to another, with a dry-run preview.npx @cortexkit/magic-context doctor migrate-session --session <id> --to <dir>.- Asymmetric embedding models (#155). Embedding providers that distinguish query vs. document input types are now driven correctly per call (
query_input_type), without invalidating your stored vectors. - Release tooling fails fast. The dashboard release script now surfaces a failed build leg immediately instead of waiting out the slow legs first, and the build is hardened against transient crates.io network drops.
Dashboard dashboard-v0.7.0
Magic Context Dashboard v0.7.0
Cache Diagnostics, rebuilt
The Cache page now tracks each session in its own bounded window instead of a
shared global event pool, so the Recent Sessions cards show per-session
hit-ratio, event count, and bust count that no longer drift with how busy other
sessions are.
- Per-session windows. Pick how many recent events to keep per session
(200 / 400 / 600 / 800 / 1000); cards and the timeline both reflect exactly
that window. - Live, reliable refresh. A 1-second loop re-lists sessions and fetches only
new events per session, so the Recent Sessions strip stays current without
the manual pause/unpause it sometimes needed before. - One-line strip. Recent Sessions render as a single row of equal-width
cards; how many show adapts to the window width.
Cache timeline
- Context-scaled bars. Bar height is the prompt size relative to the model's
context window, with an inner cached segment — so you can see the prompt grow
and drop across a session at a glance. - Accurate severity. Cache health is judged by comparing each step's cached
read against what the previous step predicted, instead of a raw ratio that
false-warned on large file reads. Providers that don't report cache data show
as "unknown" rather than a misleading bust. - Magic-Context-attributed drops. Drop markers correlate to the actual
scheduler decision recorded by the plugin (execute / materialize / emergency),
shown in a tooltip. The blue drop line is now clickable and jumps to the step. - Importance heat-map. The compartment strip in the session view colors each
segment by its importance band (critical / high / medium / low) instead of a
meaningless rainbow.
Memories & projects
- Edit a memory's category directly from the dashboard (#158).
- Non-git projects now appear in the project picker and filter their memories
correctly (#160). - Real project names. Sessions that ran in a git repo with no remote/commit
no longer display as "/"; they show their actual directory. - Windows model dropdown is populated for version-manager installs
(mise / nvm / fnm / volta / asdf) and via a PATH fallback (#149).