Files
llm-multiverse/implementation-plans
Pi Agent 45c572da5e feat: implement rolling context compaction (issue #76)
Add OrchestratorCompactor that monitors context size and automatically
compacts completed subtask results when the threshold is exceeded.
Uses Model Gateway inference for LLM-based summarization with truncation
fallback when gateway is unavailable.

- Create compaction.py with OrchestratorCompactor class
- Extend OrchestratorContext with compacted_summaries field and
  get_pending_subtask_ids() method
- Add CompactionConfig to config.py with YAML loading
- Integrate compactor into SubagentDispatcher (async _safe_add_result)
- 25 tests covering threshold detection, compaction logic, gateway
  interaction, context integrity, and dispatcher integration (97% coverage)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 21:04:11 +01:00
..