Skip to content

feat(compound): add context budget precheck and compact-safe mode#235

Open
mvanhorn wants to merge 1 commit intoEveryInc:mainfrom
mvanhorn:feat/compound-context-precheck
Open

feat(compound): add context budget precheck and compact-safe mode#235
mvanhorn wants to merge 1 commit intoEveryInc:mainfrom
mvanhorn:feat/compound-context-precheck

Conversation

@mvanhorn
Copy link

@mvanhorn mvanhorn commented Mar 8, 2026

Summary

  • Adds Phase 0: Context Budget Check before launching subagents, warning users that /compound is token-heavy (~10k tokens across 5 parallel subagents) and that long conversations risk compaction mid-compound
  • Offers users a choice between full mode (existing 5-subagent parallel workflow) and compact-safe mode (single-pass, ~2k tokens, no subagents)
  • Compact-safe mode produces a minimal but complete solution doc (frontmatter, problem, root cause, solution, one prevention tip) without launching any subagents

Motivation

Running /compound near context limits causes compaction mid-workflow, resulting in degraded output quality. This gives users visibility into the cost and an escape hatch when context is tight.

Closes #198

Test plan

  • Run /ce:compound in a fresh session - verify Phase 0 warning appears and option 1 (full mode) works as before
  • Run /ce:compound in a long session - verify warning suggests compact-safe mode
  • Select compact-safe mode (option 2) - verify single-pass doc is created without subagents
  • Verify /workflows:compound redirect still works (unchanged)

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

🤖 Generated with Claude Code

Add Phase 0 context budget check that warns users when running /compound
near context limits, and offers a compact-safe single-pass alternative
that avoids launching 5 parallel subagents.

Closes EveryInc#198

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/workflows:compound can precheck available context to avoid compaction?

1 participant