Releases: cortexkit/magic-context
Release list
v0.3.1
What's New
Message Revert Support
When users revert messages in OpenCode, magic-context now properly invalidates affected internal state — tags, reasoning watermarks, nudge anchors, note nudge state, stripped placeholder IDs, and FTS index entries. Compartments and facts are preserved since they represent compressed history that should survive reverts.
ctx_search Prompt Guidance
Agent prompts now include "search before asking" guidance with concrete examples. Agents will proactively use ctx_search to look up project paths, architectural decisions, config details, and prior conversations instead of asking the user for information that's already stored in project memory.
Bug Fixes
- Stale dream queue — Crashed dream runs no longer permanently block
/ctx-dream; stalestartedentries older than 10 minutes are cleaned before duplicate rejection. - Dream timestamp —
last_dream_atno longer advances when only smart-note evaluation succeeded but actual dream tasks failed. - Note nudge cooldown — The 15-minute cooldown now applies even when a fresh trigger arrives, preventing rapid-fire nudges at commit/todo/historian boundaries.
- Search error reporting — FTS and query failures are now logged instead of silently returning indistinguishable empty results.
v0.3.0
What's New
Smart Notes
ctx_notenow supports smart notes withsurface_condition— project-scoped conditional reminders that the dreamer evaluates nightly and surfaces when conditions are metctx_note readshows session notes plus ready smart notes; pending smart notes stay hidden until dreamer promotes them- Smart note guidance appears in agent prompts only when dreamer is enabled
Dreamer-Maintained Project Docs
- When
dreamer.inject_docsis enabled (default), magic-context injects rootARCHITECTURE.mdandSTRUCTURE.mdinto the system prompt - Per-session doc cache refreshes only on cache-busting passes to avoid mid-session churn
Monorepo Restructure
- Repository reorganized into Bun workspaces: plugin at
packages/plugin, dashboard atpackages/dashboard - Single
bun installat root installs both packages
Dashboard App (v0.1.0)
First release of the Magic Context Desktop Dashboard — a Tauri companion app for browsing and managing magic-context state:
- Memory Browser — search, filter, edit, and manage project memories with hybrid FTS/LIKE search
- Session Viewer — browse sessions, compartments, facts, notes with timeline navigation
- Cache Diagnostics — live cache hit rates, provider-side eviction detection, per-session stats
- Dreamer Management — view queue, state, timestamps; trigger dream runs
- Configuration Editor — form-based editing with searchable model selects, per-model overrides for cache TTL and thresholds, conditional embedding config, and agent model/fallback chain UI
- Log Viewer — live-tailing logs with session/component filters
- System Tray — quick access, dreamer trigger, background operation
- Auto-Update — background polling with install & restart toast (via Tauri updater plugin)
Plugin Improvements
protected_tagsmax increased from 20 to 100- Stripped placeholder message IDs now persisted across defer passes — fixes a class of defer-pass cache busts
todowritenote nudge only fires when all todo items are completed, not on every call- 15-minute in-memory cooldown on note nudge delivery to reduce noise
- Improved cache-bust cause detection in dashboard log parser
- DCP conflict detection added to setup wizard
Fixes
- Persisted
stripped_placeholder_idsinsession_metaso empty-shell removal survives OpenCode message rebuilds - Fixed note nudge triggering on intermediate todowrite calls during active work
- Sanitized FTS5 search queries (quoting tokens) —
/and other special chars no longer crash memory search - Category filter dropdown now loads correctly on page mount
- FilterSelect dropdowns auto-size to content and align properly near edges
Breaking Changes
None — fully backward compatible with v0.2.x configs and databases.
v0.2.10
Cache Safety Fixes
-
Persisted reasoning clearing watermark —
clearOldReasoningandstripInlineThinkingwere ephemeral in-memory mutations that reverted on the next defer pass when OpenCode rebuilt messages fresh from its DB. This caused a double cache bust: one from the cleanup, another when the next defer pass sent messages with reasoning blocks restored. A monotoniccleared_reasoning_through_tagwatermark is now persisted insession_metaand replayed on every pass. -
Sticky system prompt date — Midnight local date changes in OpenCode's
<env>block no longer trigger a system-prompt-hash flush. The date string is frozen on first sight and only updated on cache-busting passes, eliminating one unnecessary full-prefix cache rebuild per day. -
ctx_reduce_enabledconfig wiring —ctx_reduce_enabled: falsewas never passed from plugin config to the hook, so the nudger remained active regardless of the setting. Rolling nudges injected into assistant messages caused cache busts even withctx_reducedisabled.
v0.2.9
Bug Fixes
- Critical: Zero-config path now returns Zod-parsed defaults instead of empty object
clearIndexedMessageswrapped in transaction for consistent FTS/index state on partial failureisArrayLikeNumbertype guard strengthened to validatelengthis numeric and sample element is a number- Stale dream queue cleanup now uses configurable
maxRuntimeMinutes + 30min bufferinstead of hardcoded 2h deleteMemoryuses surgical single-memory embedding cache invalidation instead of full project invalidation- Memory promotion loop catches per-fact errors instead of aborting all remaining promotions
Cleanup
- FTS search uses
toMemory()instead of object spread for consistency - Removed unused
_unprocessedFromparameter fromhealCompartmentGaps - Standardized
getErrorMessage()usage across catch blocks
v0.2.8
Bug Fixes
- Note nudge state persisted to DB — trigger and sticky state now survives restarts without cache busts. Previously, restarting would lose deferred triggers and cause delivered nudge text to vanish from user messages (cache bust).
- Note nudge deferred to next user message — triggers mid-turn (e.g., from todowrite) no longer inject into the current cached user message. The nudge waits for the next user turn.
- Sticky note nudge replay — delivered nudges re-inject at the same anchored message on subsequent transform passes, following the same pattern as sticky turn reminders.
- Commit detection guard — false
commit_detectedtriggers no longer fire on first pass after restart.
v0.2.7
Bug Fixes
- Note nudges now work in all sessions — delivery was gated by
fullFeatureModewhich isfalsefor subagent/orchestrator sessions. Triggers fired but nudges were silently suppressed. Now runs independently offullFeatureMode. - Note nudge state only clears after successful placement — previously
triggerPendingwas cleared before confirming the append succeeded, causing silent drops when no suitable user message existed.
Improvements
- Added logging for note nudge lifecycle: trigger source, delivery, skip reasons
- Split
getNoteNudgeTextintopeekNoteNudgeText+markNoteNudgeDeliveredfor safer two-phase delivery
Full Changelog: v0.2.6...v0.2.7