v0.21.6
v0.21.6 — Hidden subagent isolation, TUI threshold visibility, doctor report size cap
What's New
- TUI sidebar and
/ctx-statusheader now show the execute threshold alongside the percentage. The header changes from47.5% · 475K / 1.0Mto a left/right layout:47.5% / 65%on the left (current usage vs the execute threshold that triggers compaction),475K / 1.0Mon the right (absolute tokens vs the model's context window). Resolved per-model, so users withexecute_threshold_percentageorexecute_threshold_tokensoverrides see the actual value applied to their session.
What's Fixed
-
Historian, dreamer, and sidekick can no longer spawn subagents or run unsafe tools. Each hidden agent now ships with a
permissionruleset that denies everything by default and explicitly allows only the tools that agent actually needs:- Historian / compressor:
read,aft_outline,aft_zoom(state-file offload + lightweight symbol navigation for accurate summaries) - Dreamer:
read,grep,glob,bash,aft_outline,aft_zoom,ctx_memory,ctx_search,ctx_note(memory CRUD + verification against project source + smart-note evaluation viagh/git/curl).task,edit,write,webfetch,websearchstay denied. - Sidekick:
ctx_search,ctx_memory,aft_outline,aft_zoom(memory retrieval + symbol-scoped structural context for/ctx-aug)
Previously these agents inherited the full primary-agent tool surface and historian was occasionally observed dispatching
task(subagent_type=explore)for repo-wide fanout, which contradicts its job of summarizing the input it was given. Allow-lists were derived from auditing real tool usage in the local OpenCode DB across hundreds of past historian and dreamer child sessions. - Historian / compressor:
-
doctor --issuereports now respect GitHub's 64KB body limit. When the rendered report exceeds the budget, the main log section is truncated from the top (oldest lines dropped) with a visible[truncated for GitHub 64KB limit — older log lines dropped]marker. A new "Recent errors (last 20, sanitized)" section is always included before the main log so error context survives even when the bulk log gets clipped.
Upgrade
npx @cortexkit/magic-context@latest doctor --forceIf OpenCode still loads a cached older plugin after upgrading the CLI, the --force flag clears the cached install so the new version takes effect on next launch.