Skip to content

v0.13.2

Choose a tag to compare

@github-actions github-actions released this 21 Apr 20:56
· 13 commits to master since this release

🐛 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 depth tiers ascending and picks the oldest contiguous run within each tier. Recent content stays fresh, old content deepens gradually — producing the smooth memory-decay gradient the design originally intended, like a human brain forgetting the middle years first. After upgrading, if you want to rebuild previously over-compressed compartments, run /ctx-recomp <start>-<end> on the affected range.

Embedding sweep — drain each project fully instead of trickling
When you switch embedding providers (e.g. swap local MiniLM for LMStudio / OpenAI), the plugin wipes stale vectors and re-embeds. The old sweep ran one 10-item batch per 15-minute timer tick — on a 400-memory project that meant ~10 hours to fully re-embed.

The sweep now drains each project fully before moving to the next, ordered by MAX(updated_at) so your active project drains first. Bounded by a 10-minute wall-clock deadline and a 3-consecutive-empty fail-safe, and guarded against parallel sweeps via a singleton flag. After a provider swap, 400+ memories now re-embed in a single tick instead of trickling for hours.

Upgrade

bunx --bun @cortexkit/opencode-magic-context@latest doctor --force

Restart OpenCode afterward.