After context compaction, Claude auto-executes "next steps" from summary without user instruction

Resolved 💬 3 comments Opened Mar 18, 2026 by ZYAH111 Closed Mar 22, 2026

Problem

After context compaction occurs, Claude resumes by reading the \"Optional Next Step\" field in the session summary and immediately begins executing code modifications — without any user instruction.

Expected behavior

After compaction recovery, Claude should pause, inform the user that the context was compressed, and wait for an explicit instruction before taking any action.

Actual behavior

Claude treats the descriptive \"next steps\" in the summary as an actionable instruction and autonomously initiates file writes.

Why this is serious

  • The summary is a historical record, not a command
  • Files can be modified without the user's knowledge or intent
  • The user has no opportunity to redirect or cancel

Suggested fix

Add a constraint to post-compaction behavior: Claude must not initiate any write operations based on summary content. The first message after recovery must always ask the user what to do next.

View original on GitHub ↗

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