Context exhaustion when orchestrating parallel agents

Resolved 💬 3 comments Opened Jan 31, 2026 by IDLEcreative Closed Feb 4, 2026

Problem

When orchestrating multiple parallel agents via the Task tool, the parent conversation's context gets exhausted quickly, requiring manual /compact to continue.

Reproduction Steps

  1. Deploy 4+ parallel agents using Task tool in a single message
  2. Monitor agents using TaskOutput with block=true
  3. When agents complete, context is often nearly exhausted
  4. Must manually run /compact to continue working

Expected Behavior

The parent conversation should maintain sufficient context to continue work after parallel agents complete. Options:

  • Auto-compact when context reaches threshold during agent orchestration
  • Agent results should be summarized/compressed before returning to parent
  • Warning when spawning agents that will likely exhaust context

Actual Behavior

Parent conversation runs out of context mid-workflow, requiring manual intervention to continue.

Environment

  • Claude Code CLI
  • Using Task tool with 4 parallel agents (type: general-purpose or specialized)
  • Each agent returned ~2-5KB of results
  • Parent conversation had existing context from prior work

Impact

  • Interrupts multi-agent workflows
  • User must manually compact and often loses context about what was happening
  • Makes complex parallel orchestration fragile

Suggested Solutions

  1. Auto-compact trigger: Automatically compact when context exceeds 80% during agent orchestration
  2. Result summarization: Compress agent results to essential information before returning
  3. Context budgeting: Reserve context for parent when spawning agents
  4. Proactive warning: Warn user before spawning agents if context will likely exhaust

View original on GitHub ↗

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