mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-15 17:08:21 -04:00
9e7b5f1701
Default compaction no longer uses a dedicated compaction agent. It inherits the session's active agent and delegates request assembly to the primary loop's shared envelope (same system prompt, instructions, skills, MCP context, and tool definitions), replaying the typed message head and appending the summary instruction as the final user message. This keeps the compaction request prefix-identical to the preceding turn so provider prompt/KV caches are reused instead of fully re-prefilled. An explicitly configured agent.compaction preserves the legacy behavior exactly: dedicated hidden agent, optional model override, and the serialized-transcript summary request.