claude-code - 💡(How to fix) Fix Assistant response re-rendered after turn ends without user input (Opus 4.7) [1 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#51940Fetched 2026-04-23 07:40:50
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×5

After the assistant finishes a turn, its response is re-rendered in the terminal without any user input. The duplicated block includes the status header ([Opus 4.7] <cwd>, ▶▶ accept edits on (shift+tab to cycle)) followed by the full response content repeated below the original. This did not happen before switching to Opus 4.7.

Root Cause

After the assistant finishes a turn, its response is re-rendered in the terminal without any user input. The duplicated block includes the status header ([Opus 4.7] <cwd>, ▶▶ accept edits on (shift+tab to cycle)) followed by the full response content repeated below the original. This did not happen before switching to Opus 4.7.

Code Example

{
  "model": "us.anthropic.claude-opus-4-7",
  "env": {
    "CLAUDE_CODE_USE_BEDROCK": "1",
    "ANTHROPIC_MODEL": "us.anthropic.claude-opus-4-7"
  }
}
RAW_BUFFERClick to expand / collapse

Description

After the assistant finishes a turn, its response is re-rendered in the terminal without any user input. The duplicated block includes the status header ([Opus 4.7] <cwd>, ▶▶ accept edits on (shift+tab to cycle)) followed by the full response content repeated below the original. This did not happen before switching to Opus 4.7.

Environment

  • Claude Code version: 2.1.117
  • Model: Opus 4.7 (via Bedrock)
  • Platform: macOS (Darwin 25.4.0)
  • Shell: zsh
  • Terminal: iTerm2

Relevant settings (sanitized):

{
  "model": "us.anthropic.claude-opus-4-7",
  "env": {
    "CLAUDE_CODE_USE_BEDROCK": "1",
    "ANTHROPIC_MODEL": "us.anthropic.claude-opus-4-7"
  }
}

Steps to reproduce

  1. Start a session with Opus 4.7 on Bedrock
  2. Send any prompt
  3. Wait for the response to complete
  4. Observe: the response is re-rendered below itself without pressing any key or submitting input

Expected behavior

Response is rendered once at end of turn; the CLI waits for user input.

Actual behavior

Response appears twice in the scrollback: first as the normal turn output, then repeated below with the status banner above the duplicate.

Notes

  • Did not occur on Opus 4.6.
  • No custom UserPromptSubmit / Stop / SessionStart hooks are configured.
  • Existing PreToolUse / PostToolUse hooks do not print to stdout.

extent analysis

TL;DR

The issue can likely be resolved by adjusting the rendering logic to prevent duplicate responses, possibly related to changes in Opus 4.7.

Guidance

  • Verify that the issue is specific to Opus 4.7 by testing with previous versions, such as Opus 4.6, to confirm the regression.
  • Investigate the rendering logic in the Claude Code version 2.1.117 to identify potential causes for the duplicate response, focusing on changes introduced in Opus 4.7.
  • Check the Bedrock integration and its configuration, specifically the CLAUDE_CODE_USE_BEDROCK environment variable, to ensure it's not contributing to the issue.
  • Review the iTerm2 terminal settings and zsh shell configuration for any potential interference with the rendering process.

Example

No specific code snippet can be provided without more information on the rendering logic, but the fix might involve modifying the response handling in the Claude Code to prevent re-rendering.

Notes

The solution may depend on the specific implementation details of the Claude Code and Opus 4.7 integration, which are not fully provided in the issue description.

Recommendation

Apply a workaround by adjusting the rendering logic or configuration settings until a permanent fix is available, as the issue seems to be related to the update to Opus 4.7.

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…

FAQ

Expected behavior

Response is rendered once at end of turn; the CLI waits for user input.

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 Assistant response re-rendered after turn ends without user input (Opus 4.7) [1 participants]