Opus 5 at High Effort Extended Thinking

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 4, 2026

Preflight Checklist

  • [x] I have searched existing issues for similar behavior reports
  • [x] This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Claude modified files I didn't ask it to modify

What You Asked Claude to Do

Long tutoring session. I asked for feedback on my Python file and to tell me what to fix next. My instructions (in CLAUDE.md) explicitly forbid Claude from writing solution code for me.

What Claude Actually Did

  1. Replied normally at first.
  2. Its response then included a block of text presented as if I had sent it, containing Python code I never wrote.
  3. It then replied to that invented message inside the same turn.
  4. Literal role markers (user, antml:invoke) appeared as plain text in the output.
  5. Because the invented message contained code, this also broke my explicit instruction that Claude must never write code for me.

<img width="1564" height="696" alt="Image" src="https://github.com/user-attachments/assets/b2cddf2a-6d29-425b-a66e-da43f8c4b129" />

<img width="1865" height="618" alt="Image" src="https://github.com/user-attachments/assets/8d1a78d0-1ef3-4004-9591-5fe9a9776909" />

Expected Behavior

One assistant turn containing only Claude's own reply. No invented user messages, no role markers in the output.

Files Affected

Permission Mode

Accept Edits was ON (auto-accepting changes)

Can You Reproduce This?

Haven't tried to reproduce

Steps to Reproduce

happens intermittently in a very long session (multiple hours, hundreds of turns). Not reliably reproducible.

Claude Model

Opus

Relevant Conversation

Impact

Medium - Extra work to undo changes

Claude Code Version

v2.1.220

Platform

Anthropic API

Additional Context

_No response_

View original on GitHub ↗