v0.34.0
Magic Context v0.34.0
Highlights
Compaction-off mode (#266)
compaction.enabled: false keeps Magic Context's knowledge surfaces — project memory, docs injection, ctx_search, ctx_expand, notes — while handing history management back to the harness's native compaction. For sessions that want memory without history rewriting. ctx_reduce is unregistered in this mode; historical compartments remain readable through ctx_expand. Switching requires a restart; turning compaction back on suggests /ctx-wrapup as the catch-up path.
Output-token reservation in context budgets (#275)
Magic Context now measures pressure against a model's safe input window. Shared-window providers (Anthropic, OpenAI, vLLM, and compatible engines enforcing prompt + max_tokens <= window) reserve the advertised output allowance from the combined context window, capped at 25%. Pre-carved input limits (OpenAI's catalog input values) are used verbatim. Google/Gemini's separate output quota keeps the full window. A user-tier output_reserve setting overrides the reservation globally or per model; 0 disables it.
This intentionally shifts displayed percentages and compaction points: /ctx-status, sidebars, and dashboards now divide by the safe window, so sessions on shared-window engines compact earlier — before the provider wall instead of into it. Overflow-detected limits are provenance-classified (prompt_only ceilings enter as pre-carved; combined windows narrow before reservation) so provider-reported limits are never double-reserved.
With output headroom explicit, the maximum execute_threshold_percentage rises from 80% to 90%. Escalation bands (force materialization, emergency drain, tiered drop) derive from the effective threshold as max(85, threshold + 2); the 95% emergency wall stays absolute. Configurations at or below 80% behave exactly as before.
Migrating hand-carved limits: if your configured context already subtracts output headroom (a common workaround before this release), restore the model's true combined window or set output_reserve: 0 — otherwise the reservation applies twice. Worked example: a hand-carved context: 110000 against a 16k output allowance now yields a 94k budget; the true combined limit is what the config should carry.
Fixes
- Rust-mode store integrity: cross-generation memory identity collisions (the cause of wedged rust-mode sessions serving raw arrays into provider 400s) are resolved by an adoption arm in the sync path plus store hygiene migrations; stale-generation rows no longer double-render into history.
- todowrite permission gating: disabling todowrite via OpenCode's
permissionblock now takes effect mid-session — synthetic todo state stops injecting and clears on the next natural cache boundary. Availability re-evaluates through OpenCode's permission rules rather than the per-message tools map (which never reflects permission denies). - Background notice timing: internal status notices (embedding progress, historian updates) no longer create user rows while a turn is running — previously this could produce a request ending with an assistant message, rejected by models that do not support assistant prefill.
- Compartment trigger on non-Anthropic models (#274): pressure projection no longer counts reasoning bytes that clearing cannot reclaim, fixing trigger self-suppression on providers that reject empty content.
- Historian resilience (#276): reasoning-only and length-capped historian responses now surface as retryable failures with diagnostics instead of dying silently.
- Dashboard fail-open alarms (#271): resolved false "fail-open" warnings caused by version-string comparison.
- Pi in-process subagent OOM (#247): initialization latch prevents duplicate heavy imports.
- Dashboard Desktop config discovery (#248): Config Editor now resolves projects through the session-projects authority.
- OMO conflict detection (#269, #258): recognizes the unified
~/.omo/omo.jsonclayout. - TTL boundary parity: cache-TTL expiry comparators now match between the TypeScript and Rust legs at exact-boundary instants.
Config additions
compaction.enabled(user/project, defaulttrue)output_reserve(user-tier, tokens; number or per-model map;0disables)storage.enforce_private_permissions(#252, user-tier, defaulttrue) — allows group-managed shared deployments to skipchmodtightening.allow_home_project(#251, user-tier, defaultfalse) — opt-in project identity for$HOMEitself; home identity is excluded from registry seeds, and a git root that resolves to$HOMEnow requires the same opt-in.cache_ttl: "never"(PR #245) — never-expiring cache lanes; status surfaces report-1for never-expiring remaining time.embedding.dtype(#259) — explicit local-embedding precision (defaultfp32, unchanged behavior).
Community
PR #261 (Windows CLI launcher hardening), PR #265 (MiniMax regional endpoint calibration), PR #245 (cache_ttl: "never"), PR #273 (mid-turn release valve part inspection) — thank you.
Migrations
context.db v72–v74 (compaction-mode record, permission verdict persistence, detected-limit provenance); module store 44–45 (memory identity hygiene). Both apply on first start; downgrading afterwards requires the paired binary.