[BUG] "Clear context" option appears but doesn't actually clear context when exiting plan mode
Resolved 💬 2 comments Opened Apr 16, 2026 by DawnFire42 Closed May 25, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
When exiting plan mode, the "Yes, clear context and accept edits" option is displayed (with showClearContextOnPlanAccept: true enabled). However, selecting this option does NOT actually clear the context - the conversation history and context usage remain unchanged.
This occurs even in a fresh Claude Code session after a full system reboot.
What Should Happen?
Selecting "Yes, clear context and accept edits" should clear the conversation context, similar to running /clear.
Steps to Reproduce
- Enable
"showClearContextOnPlanAccept": truein~/.claude/settings.json - Start a new Claude Code session (fresh terminal, even after reboot)
- Enter plan mode
- Create a plan with substantial context usage
- When Claude calls
ExitPlanMode, select "Yes, clear context and accept edits" - Bug: Context is NOT cleared - run
/contextto verify usage is unchanged
Claude Model
Opus
Is this a regression?
Unknown
Claude Code Version
2.1.110
Platform
Anthropic API
Operating System
Linux (6.17.0-20-generic)
Terminal/Shell
bash
Additional Information
Related issues (different bugs):
- #46353 - option doesn't appear for new projects (in this case the option DOES appear)
- #33225 - plan mode remains active after clear (different symptom)
Settings:
{
"permissions": { "defaultMode": "plan" },
"showClearContextOnPlanAccept": true,
"model": "claude-opus-4-5"
}
Workaround: Manually run /clear after exiting plan mode.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗