claude-code - 💡(How to fix) Fix Long streamed responses occasionally triplicate sections of output

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

On longer streamed responses (~3000+ tokens, multi-minute renders), Claude Code occasionally re-emits middle chunks of the output, producing visible triplication of headers and content in the terminal. The model's own context shows the response only once, so this appears to be happening at the streaming/rendering layer between model output and terminal display — and is invisible to the model.

Root Cause

User has 3 screenshots that clearly show the triplication. Not auto-attached because they contain personal reading-list content. Available on request.

RAW_BUFFERClick to expand / collapse

Summary

On longer streamed responses (~3000+ tokens, multi-minute renders), Claude Code occasionally re-emits middle chunks of the output, producing visible triplication of headers and content in the terminal. The model's own context shows the response only once, so this appears to be happening at the streaming/rendering layer between model output and terminal display — and is invisible to the model.

Repro pattern

  • Trigger any skill or response that produces >2500 tokens of output
  • Likelihood scales with response length and time-to-complete (a 2m 36s "Brewed" indicator was observed in one repro)
  • Reporting user has hit this multiple times; "almost always for longer outputs"

Observed example

  • Skill: a long newsletter-digest output (~3000 tokens, "Brewed for 2m 36s")
  • Symptom: a ### READ THESE FIRST block + an ### 🤖 Tech / AI block were each emitted three times in a row in the terminal
  • Same content, same formatting, repeated verbatim
  • Verified in the model's own context view: the message appears exactly once. The duplication is purely at the delivery layer.

Why this is hard to diagnose from the model's side

The model doesn't see what the terminal renders — only what gets recorded as the final delivered message. So when the user reports duplication, the model has no signal that anything is wrong with its own output, may even dispute the user's report ("I see the section only once"), and will misdiagnose by proposing changes to the upstream skill logic instead of the streaming layer.

A model-side affordance (e.g. ability to read the rendered transcript, or a streaming-integrity checksum) would help here. Failing that, faster identification of the symptom as "this is a known CC delivery bug, not a skill issue" via a documented troubleshooting note would save user time.

Environment

  • Claude Code CLI on macOS Darwin 24.6.0
  • Model: Opus 4.7 (1M context)
  • Long, streaming-heavy response

Screenshots

User has 3 screenshots that clearly show the triplication. Not auto-attached because they contain personal reading-list content. Available on request.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING