claude-code - 💡(How to fix) Fix [BUG] Opus 4.8: Repeated/duplicated output blocks in Claude Code CLI, worsening with session length

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…

Error Message

Error Messages/Logs

No error messages. The duplication appears silently in the terminal output. Example of observed output (git sync status response):

Fix Action

Fix / Workaround

  • macOS version: 26.5 (Build 25F71)
  • Terminal version: default macOS Terminal.app
  • The duplication appears to occur in the rendering/streaming pipeline rather than in the model's reasoning
  • Similar pattern to the Opus 4.7 line-duplication bug reported in #50689
  • Confirmed reproducible across multiple sessions
  • No workaround found yet

Code Example

No error messages. The duplication appears silently in the terminal output. Example of observed output (git sync status response):

⏺ 完了しました ✅ ローカルと origin/main は完全に同期しています。
  366d152  Track eval source scripts ← 今回
  72cbeb5  Parallelize per-source summarization ← 前回

⏺ 完了しました ✅ ローカルと origin/main は完全に同期しています。
  366d152  Track eval source scripts ← 今回
  は完全に同期しています(origin/main..main は空=差分なし)。

⏺ 完了しました ✅ ローカルと origin/main は完全に同期しています。
  366d152  Track eval source scripts ← 今回
+12 lines (ctrl+o to expand)

(Pattern repeats 8+ more times in the same response)
RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

In Claude Code CLI (Opus 4.8), tool call output blocks are duplicated multiple times within a single response. The same text block repeats 5–10+ times consecutively. The issue worsens as the session grows longer and is consistently reproducible.

What Should Happen?

Each tool call output block should appear exactly once per response.

Error Messages/Logs

No error messages. The duplication appears silently in the terminal output. Example of observed output (git sync status response):

⏺ 完了しました ✅ ローカルと origin/main は完全に同期しています。
  366d152  Track eval source scripts ← 今回
  72cbeb5  Parallelize per-source summarization ← 前回

⏺ 完了しました ✅ ローカルと origin/main は完全に同期しています。
  366d152  Track eval source scripts ← 今回
  は完全に同期しています(origin/main..main は空=差分なし)。

⏺ 完了しました ✅ ローカルと origin/main は完全に同期しています。
  366d152  Track eval source scripts ← 今回
     … +12 lines (ctrl+o to expand)

(Pattern repeats 8+ more times in the same response)

Steps to Reproduce

  1. Start a Claude Code CLI session using Opus 4.8
  2. Run tasks involving git operations (e.g., checking sync status)
  3. Continue the session for several exchanges
  4. Observe that the same output block repeats multiple times in a single reply

The issue is reproducible consistently and worsens with session length.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

Unknown — migrated directly from Sonnet to Opus 4.8

Claude Code Version

2.1.157

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

  • macOS version: 26.5 (Build 25F71)
  • Terminal version: default macOS Terminal.app
  • The duplication appears to occur in the rendering/streaming pipeline rather than in the model's reasoning
  • Similar pattern to the Opus 4.7 line-duplication bug reported in #50689
  • Confirmed reproducible across multiple sessions
  • No workaround found yet

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

claude-code - 💡(How to fix) Fix [BUG] Opus 4.8: Repeated/duplicated output blocks in Claude Code CLI, worsening with session length