Add setting to choose compact vs clear when exiting plan mode
Feature Request
When exiting plan mode, Claude Code currently offers to clear context and execute the plan. It would be valuable to have a setting that lets users choose compact instead.
Why This Matters
During plan mode, the conversation accumulates valuable context — reasoning behind decisions, rejected approaches, edge cases discussed. Clearing wipes all of this, so Claude starts execution with only the final plan text.
Compacting preserves a summary of that exploration, giving Claude more context about why the plan looks the way it does during execution. This generally leads to better output quality.
Proposed Solution
A setting like:
{
"planModeExitAction": "compact" // or "clear" (default)
}
This would let users choose whether exiting plan mode triggers a clear or a compact before execution begins.
Current Workaround
Users can decline the clear prompt, manually run /compact, then tell Claude to execute — but this adds friction to an otherwise smooth workflow.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗