Plan Mode: Auto-executing plans without user confirmation after context compaction

Resolved 💬 3 comments Opened Feb 1, 2026 by JoeyVIP Closed Feb 5, 2026

Description

When a conversation runs out of context and gets compacted/summarized, the system automatically injects "Implement the following plan:" followed by the plan content at the start of the new session. This causes the assistant to start executing the plan immediately without re-confirming with the user.

Steps to Reproduce

  1. Enter plan mode and create a detailed implementation plan
  2. User approves the plan using ExitPlanMode
  3. Context runs out during implementation, triggering automatic compaction
  4. New session starts with the summary

Observed Behavior

The new session receives a "user" message like:

{"type":"user","message":{"role":"user","content":"Implement the following plan:\n\n[plan content]..."}}

The assistant sees this as a user instruction and begins implementing immediately.

Expected Behavior

After context compaction, the assistant should:

  1. Inform the user that a plan exists from the previous session
  2. Ask for confirmation before continuing implementation
  3. Give the user the option to modify the plan or cancel

Impact

Users lose control over when implementation begins. They may not be ready to proceed, or may want to review/modify the plan before continuing.

Environment

  • Claude Code CLI
  • macOS

---
🤖 This issue was reported with assistance from Claude Code

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗