v0.3.2
What's New
Smarter Compartment Trigger Projection
The compartment trigger now projects all three sources of freeable context before deciding whether historian needs to fire:
- Heuristic tool drops — Old tool outputs outside the protected tail, based on
auto_drop_tool_ageandprotected_tags - Reasoning clearing — Thinking/reasoning bytes that will be cleared on the next cache-busting pass, based on the reasoning watermark and
clear_reasoning_age - Pending ctx_reduce drops — User-queued drops now include both text and reasoning bytes
This is especially impactful with ctx_reduce_enabled: false, where the system previously fired historian at every threshold crossing because it couldn't project any freeable space. Now it correctly accounts for automatic cleanup and delays historian until it's actually needed.
Message Revert Support
When users revert messages in OpenCode, magic-context now properly invalidates tags, reasoning watermarks, nudge anchors, note nudge state, stripped placeholder IDs, and FTS index entries.
ctx_search Prompt Guidance
Agent prompts now include "search before asking" guidance with concrete examples, so agents proactively search project memory instead of repeatedly asking for information that's already stored.
Bug Fixes
- Stale dream queue — Crashed dream runs no longer permanently block
/ctx-dream - Dream timestamp —
last_dream_atno longer advances on smart-note-only success - Note nudge cooldown — 15-minute cooldown applies even when fresh triggers arrive
- Search error reporting — FTS/query failures are now logged instead of silently returning empty results
- Projection denominator — Fixed ratio math that could overstate projected savings when reasoning bytes were large relative to text
- Drop ratio clamping — Projected drop ratio is now clamped to [0, 1] as a safety bound