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:

  1. In-progress audit state — which agents have completed, what their findings were
  2. Cross-reference context — findings from completed agents that inform the remaining analysis
  3. 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

  1. Start a conversation with a large codebase
  2. Discuss context (read files, review state, discuss approach)
  3. Deploy 4 parallel audit agents
  4. Wait for agents to complete — by the time all 4 return, the context has filled and compaction fires
  5. 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

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗