Problem
When accepting a plan in Plan Mode, the only context management option available is "clear context" (enabled via showClearContextOnPlanAccept). This is a binary choice: either keep the full context (with all exploration cruft) or wipe it entirely.
Clearing context loses valuable information — decisions made during exploration, constraints discovered, instructions from skills/workflows, and reasoning that informed the plan. Keeping everything wastes context window on verbose tool outputs and dead-end explorations.
Proposed Solution
Add a "compact context and implement" option to the plan acceptance prompt, alongside the existing clear/keep options. This would run the equivalent of /compact before transitioning to execution mode.
Compaction preserves the important parts (decisions, constraints, plan rationale) while removing noise (verbose tool outputs, exploration tangents, failed attempts). This gives the execution phase a clean but informed context window.
Possible implementations
- New option in the plan accept prompt: "Yes, compact context and implement" as a third choice
- New setting:
compactOnPlanAccept: true (similar to showClearContextOnPlanAccept)
- New hook event:
PlanAccept — would let users configure any behavior at the plan→execution transition, including but not limited to compaction
Option 3 is the most flexible and consistent with the existing hooks architecture.
Current Workaround
Accept plan → manually run /compact → Claude resumes execution. Works, but adds friction to every plan cycle.
Related Issues
Problem
When accepting a plan in Plan Mode, the only context management option available is "clear context" (enabled via
showClearContextOnPlanAccept). This is a binary choice: either keep the full context (with all exploration cruft) or wipe it entirely.Clearing context loses valuable information — decisions made during exploration, constraints discovered, instructions from skills/workflows, and reasoning that informed the plan. Keeping everything wastes context window on verbose tool outputs and dead-end explorations.
Proposed Solution
Add a "compact context and implement" option to the plan acceptance prompt, alongside the existing clear/keep options. This would run the equivalent of
/compactbefore transitioning to execution mode.Compaction preserves the important parts (decisions, constraints, plan rationale) while removing noise (verbose tool outputs, exploration tangents, failed attempts). This gives the execution phase a clean but informed context window.
Possible implementations
compactOnPlanAccept: true(similar toshowClearContextOnPlanAccept)PlanAccept— would let users configure any behavior at the plan→execution transition, including but not limited to compactionOption 3 is the most flexible and consistent with the existing hooks architecture.
Current Workaround
Accept plan → manually run
/compact→ Claude resumes execution. Works, but adds friction to every plan cycle.Related Issues