claude-code - 💡(How to fix) Fix [BUG] Opus 4.7 (1M context, Max plan) duplicates response output in terminal and consumes significantly more tokens than Opus 4.6 [1 comments, 2 participants]

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…
GitHub stats
anthropics/claude-code#52773Fetched 2026-04-25 06:21:21
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4closed ×1commented ×1

Error Message

Error Messages/Logs

No explicit error messages are shown. The problem is visible in normal stdout — the assistant's response content itself is repeated. (Happy to attach a session transcript or --debug log if useful — let me know what would help.)

Code Example

No explicit error messages are shown. The problem is visible in normal stdout — the assistant's response content itself is repeated. (Happy to attach a session transcript or --debug log if useful — let me know what would help.)
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?

When using Claude Opus 4.7 with the 1M context window (Max plan) in Claude Code, the response in the terminal appears to be duplicated or repeated. The same text (or something very close to it) is printed back multiple times within a single reply, making the output confusing and hard to read. It is not clear whether Claude is actually performing the same work more than once, spawning multiple sub-agents that each emit output, or simply re-printing the same final text — but the effect is that a single prompt produces output that looks like it has been multiplied. In addition, token usage is substantially higher than with Opus 4.6 for comparable prompts. I suspect the duplication behavior may be contributing to the increased token consumption, but I cannot confirm whether the two issues are related. The overall experience makes Opus 4.7 1M (Max) almost unusable for day-to-day work in Claude Code.

What Should Happen?

A single prompt should produce one clean, non-duplicated response in the terminal, and token usage should be broadly in line with what Opus 4.6 uses for a comparable task.

Error Messages/Logs

No explicit error messages are shown. The problem is visible in normal stdout — the assistant's response content itself is repeated. (Happy to attach a session transcript or --debug log if useful — let me know what would help.)

Steps to Reproduce

Launch Claude Code in the terminal. Select the Claude Opus 4.7 model with the 1M context window on the Max plan. Send any non-trivial prompt (the duplication appears to happen across a wide range of prompts, not a specific one). Observe the response: the same content is repeated / multiplied within the single reply. Compare token usage against the same prompt run on Opus 4.6 — 4.7 uses notably more tokens.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.119

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

Does Opus 4.7 in Claude Code spawn multiple sub-agents or parallel workers whose outputs are being concatenated into a single visible reply? If so, is that behavior expected only at the 1M context / Max tier, or is it present on all 4.7 configurations? Could the elevated token usage vs. 4.6 be explained by the duplicated output, or is it an independent increase (e.g. more internal reasoning, more tool calls)?

extent analysis

TL;DR

The issue with duplicated responses in Claude Code when using Opus 4.7 with the 1M context window may be related to changes in how the model handles output or token usage compared to Opus 4.6.

Guidance

  • Verify if the issue persists when using a different context window size or model configuration to isolate the problem.
  • Compare the output of Opus 4.7 with the 1M context window to Opus 4.6 for the same prompt, focusing on any differences in formatting or content that might indicate why the duplication occurs.
  • Check if there are any known issues or updates regarding the Anthropic API or Claude Code version 2.1.119 that could be related to this behavior.
  • Consider reaching out to the developers or support team for further assistance, as the issue might be specific to the interaction between Claude Code and the Opus 4.7 model.

Notes

The exact cause of the duplicated output and increased token usage is unclear without more information about the internal workings of Opus 4.7 and how it differs from Opus 4.6. The issue could be related to changes in the model's architecture, the way it processes prompts, or how it generates responses.

Recommendation

Apply workaround: Test the model with different configurations and context window sizes to find a setup that does not exhibit the duplication issue, as this might provide a temporary solution until the root cause is addressed.

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.7 (1M context, Max plan) duplicates response output in terminal and consumes significantly more tokens than Opus 4.6 [1 comments, 2 participants]