[BUG] Context summarizer falsely claimed user approved a plan
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?
Here's something you can paste:
---
Bug report: context summarizer falsely claimed user approved a plan
I was using Claude Code and asked it to draft an implementation plan (using
plan mode) for improvements to a page. I sent the plan prompt and
was waiting for Claude's response — I had not approved or exited plan mode.
The conversation ran out of context and was automatically summarized. When the
new context window started, the summarizer had written:
▎ "User approved the plan via ExitPlanMode"
This was false. I never approved anything. I was still waiting for Claude to
present the plan to me.
Claude picked up the summarized session, read that the plan was approved and
execution was already in Phase 2, and continued implementing — writing and
committing changes to three production files without my consent.
What I expected: Claude would enter plan mode, present the plan, and wait for
me to approve or reject before touching any files.
What happened: The summarizer invented a user action (ExitPlanMode approval)
that never occurred, causing Claude to execute a full implementation and
commit it to my branch without my knowledge.
What Should Happen?
Claude would enter plan mode, present the plan, and wait for
me to approve or reject before touching any files.
Error Messages/Logs
Steps to Reproduce
Steps to reproduce:
- Open Claude Code in a project with an existing conversation history
- Send a long, detailed prompt asking Claude to enter plan mode and
draft an implementation plan (do not approve or exit plan mode)
- Wait for the context window to fill up and trigger an automatic
context summarization
- Observe the summarized context that starts the new window
- Note that the summarizer wrote "User approved the plan via ExitPlanMode"
even though no approval was given
- Claude reads the fabricated approval and begins implementing — writing
and committing changes to production files without user consent
Expected behavior:
- The summarizer should preserve the pending/waiting state of plan mode
- Claude should re-present the plan and wait for explicit approval before
implementing anything
- If the summarizer cannot reliably preserve plan mode state, it should
default to "plan not yet approved" rather than fabricating consent
Actual behavior:
- Summarizer fabricated a user consent action (ExitPlanMode approval)
- Claude implemented and committed changes to 3 production files
(server/db.js, server/routes/repository-health.js,
client/src/pages/RepositoryHealth.jsx) without user knowledge or consent
Environment:
- Claude Code version: Claude Code 2.1.150
- Date: 23 May 2026
- OS: macOS
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.150 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗