[BUG] Claude Code incorrectly handles out limit of output tokens / doesn't wait for the answer enough

Resolved 💬 4 comments Opened May 16, 2025 by linegel Closed Aug 22, 2025

Environment

  • Platform (select one):
  • [x] AWS Bedrock / us.anthropic.claude-3-7-sonnet-20250219-v1:0
  • Claude CLI version: 0.2.115 (Claude Code)
  • Operating System: macOS 15.3.1 (24D70)
  • Terminal: terminal/zsh

Bug Description

Unexpected

``API Error (Request timed out.) · Retrying in 1 seconds… (attempt 1/10)``

When actual generation happens and tokens are being generated/consumed

Expected Behavior

Depending on what is actual issue either
a. Increase timeout limit
b. Correctly handle hitting limit of output tokens and either re-create prompt or handle it via "continue from ..." approach

Actual Behavior

Claude Code just repeats the same prompt and fails with the same error

Additional Context

Screenshot

!Image

View original on GitHub ↗

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