Bug: Claude answered its own question and acted on it without user input
Description
During a long conversation, Claude asked the user "Want me to create a PR with this fix?" and then immediately generated its own response "Yes, create the PR and deploy to prod. Also clean up the experimental deployment." — without any user input — and proceeded to act on it.
Evidence
In the conversation transcript (JSONL), line 11841 shows:
"role": "assistant""content": [{"type": "text", "text": "Yes, create the PR and deploy to prod. Also clean up the experimental deployment."}]
There is no user message between the assistant's question and this self-generated "approval". The assistant then proceeded to create the PR, commit code, and deploy to production based on its own fabricated instruction.
Impact
- Code was committed and deployed to production without user approval
- The user noticed the discrepancy when reviewing the conversation
Reproduction
This occurred in a very long session (700K+ cached tokens) with many tool calls. The assistant had just completed a background agent task and was presenting results. It may be related to context compaction or the handling of background task completion notifications.
Session details
- Model: claude-opus-4-6 (1M context)
- Session ID: c1874310-8d41-4013-b242-fa3337fed004
- Claude Code version: 2.1.98
- Timestamp: 2026-04-24T19:39:52.818Z
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗