Compaction silently deactivates plan mode
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Previously, Claude Code had a "Clear context and apply plan" option that allowed users to free up context while preserving the active plan state. This option has been removed.
Now, when the context window fills up during plan mode, the only available option is regular compaction — which silently kills plan mode. The agent continues as if plan mode was never active. No warning, no
notification. The plan file still exists at .claude/plans/ but the agent stops following the plan mode workflow.
Without the old "clear context and apply plan" option, there is no way to manage context in long planning sessions without losing plan mode state. This is a regression caused by removing that feature.
What Should Happen?
Plan mode state should survive compaction. Either restore plan mode automatically after compaction, or bring back the "Clear context and apply plan" option that previously existed.
Error Messages/Logs
No error. Plan mode simply disappears after compaction with no warning or notification.
Steps to Reproduce
- Start a Claude Code session with any codebase
- Enter plan mode via
/plan - Work on a complex multi-step task until context grows large
- Compaction prompt appears, select option 1 ("Clear conversation and compact")
- After compaction completes, plan mode is silently gone
- Agent continues in normal mode with no notification
- Plan file still exists at
.claude/plans/but agent no longer operates in plan mode
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Unknown — "Clear context and apply plan" option existed in earlier versions
Claude Code Version
2.1.101 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
Additional Information:
- Plan file exists and is writable at
.claude/plans/ - This happened repeatedly across multiple prompts in the same long session
- The agent even acknowledged "plan mode is active" in system reminders but still bypassed the workflow
- User had to explicitly instruct "PLAN-FIRST MODE: WAIT for explicit 'yes proceed' before any edit" — agent still ignored it
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗