When a decision changes, work stalls, or a check passes, the agent updates the ticket or handoff. It records scope, edits to preserve, what passed, and what to check next.
Compaction summarizes older turns so work can continue in the same chat. These optional settings target a 200k working window. Back up your config and keep smaller model limits.
- OpenCode V2: On versions supporting model transforms and the compaction hook (originally used on v2.4.3), copy
index.tsinto.opencode/plugins/engineering-workflow-context/index.tsin the project, or~/.config/opencode/plugins/engineering-workflow-context/index.tsglobally. Merge"compaction": {"auto": true, "background": true, "buffer": "10%", "keep": {"tokens": 15000}}in the applicableopencode.json(c). This starts compaction around 180k on a 200k working window. See OpenCode compaction. - Claude Code: On supported versions, merge
"autoCompactWindow": 200000into the applicable.claude/settings.json. Under## Compact InstructionsinCLAUDE.md, request that the summary retain intent, permissions, evidence, and next action. Check for model-specific overrides. See Claude Code model configuration. - Codex: On versions exposing
model_auto_compact_token_limit, setmodel_auto_compact_token_limit = 180000at the top level of the applicableconfig.tomlfor a large-window model. Use a lower threshold for a smaller model. See the Codex configuration reference. - Other Clients: Use the client's compaction settings, if supported.
To uninstall, remove the added plugin and restore the previous settings.