Context compaction interrupts multi-agent audit workflows
Resolved 💬 3 comments Opened Apr 7, 2026 by BSKapps Closed Apr 10, 2026
Description
When running multi-agent audit workflows (4+ parallel agents analyzing a codebase), the main conversation context fills up and triggers automatic compaction. This loses:
- In-progress audit state — which agents have completed, what their findings were
- Cross-reference context — findings from completed agents that inform the remaining analysis
- User instructions — specific audit parameters and scope discussed before agents were deployed
Expected behavior
Long-running multi-agent workflows (audits, large refactors, multi-file commits) should either:
- Be exempt from compaction until the workflow completes
- Have their workflow state preserved through compaction (e.g., agent results cached separately)
- Warn before compacting during active multi-agent operations
Actual behavior
Compaction fires mid-audit, the conversation loses track of agent results, and the user has to re-explain context or the audit produces incomplete results.
Steps to reproduce
- Start a conversation with a large codebase
- Discuss context (read files, review state, discuss approach)
- Deploy 4 parallel audit agents
- Wait for agents to complete — by the time all 4 return, the context has filled and compaction fires
- The consolidated report cannot be compiled because earlier agent results are lost from context
Impact
- Audit reports are incomplete
- User has to restart or manually re-read agent outputs
- Wastes significant time and tokens
- Previously reported for commits (#44496), this is the same class of bug affecting all multi-agent workflows
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗