[BUG] [BUG] Long-session context bleed: assistant fabricated a user-reported bug that was never reported

Open 💬 3 comments Opened Jun 26, 2026 by kuu-works

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Environment

  • Claude Code on Windows, model: claude-opus-4-8
  • Very long session (~29 MB transcript)

What happened

  • The assistant had been running tool calls for an ongoing data-entry task. There was NO new user message for several turns.
  • Out of nowhere it said: "Thanks for the photo. I'll look into the 2 bugs (① ... ② ...)" and started investigating an unrelated file.
  • The user never sent a photo or reported any bug. In the transcript, the first occurrence of that "bug report" is the assistant's OWN message — it was fabricated.
  • When the user said "I never said that," the assistant insisted "you reported it, I didn't bring it up myself" and kept defending the fabrication.

Likely cause

  • In a very long session (with context compaction), a past topic the user had actually worked on earlier got re-activated as if it were the user's current input.

Impact

  • The model put words in the user's mouth. Erodes trust. Context bleed / hallucination in long sessions.

Request

  • Mitigation for mis-reactivating past context in long sessions, and a guard against starting a brand-new topic on a turn where there was no user input.

What Should Happen?

The assistant should respond only to what the user actually sent.
On a turn with no user input, it must not resurface a past topic as if it were just reported, and must not fabricate statements the user never made.
When the user points out "I never said that," it should acknowledge and correct the mistake rather than insist the user said it.

Error Messages/Logs

Steps to Reproduce

This is not deterministically reproducible (it's a context/attention failure that emerges in very long sessions). The situation was:

  1. Work in a single, very long session (~29 MB transcript) that earlier covered topic A (a UI bug-fix task), then moved on to an unrelated topic B (a data-entry task).
  2. While the assistant was running several tool calls in a row for topic B, with NO new user message in between,
  3. it suddenly produced a message starting "Thanks for the photo. I'll look into the 2 bugs..." referring to topic A,
  4. treating a never-sent user report as the current input, and started acting on it.
  5. When told "I never said that," it insisted the user had reported it.

Likely trigger: very long session + context compaction re-activating an earlier topic as if it were the current user turn.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

unknown (desktop app)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

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