Compaction can inject stale no-tools instructions and brick the session
Resolved 💬 5 comments Opened Apr 17, 2026 by shawnsw Closed Jun 11, 2026
After compaction/continuation, Claude Code sometimes injects stale instructions like:
- “CRITICAL: Respond with TEXT ONLY. Do NOT call any tools.”
- “Do NOT use Read, Bash, Grep, Glob, Edit, Write, or ANY other tool.”
- “Your entire response must be plain text: an <analysis> block followed by a <summary> block.”
Observed result:
The resumed session becomes effectively unusable because the model treats those leaked lines as active constraints and stops using tools.
What I verified:
- not from repo files
- not from local hooks
- earliest visible local occurrence is inside a continuation summary message under
~/.claude/projects/..., stored as atype:"user"message
Expected:
Compaction summaries should not replay stale response-format/tool-ban instructions as live user constraints in resumed sessions.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗