[BUG] Tool-usage with large parameters can cause indefinite retry loops

Resolved 💬 3 comments Opened Jun 27, 2025 by ShitizZip Closed Jan 3, 2026

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [x] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.35 <!-- output of claude --version -->
  • Operating System: macOS 15.5 <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 -->
  • Terminal: Terminal App <!-- e.g. iTerm2, Terminal App -->

Bug Description

Claude models cannot stream tool arguments, and as a result have to process the entire tool response before sending it as an output. This means that when writing large files or compact summaries, it can just cause an indefinite timeout loop because it just needs more time to process through a certain number of tokens.

I am using the following prompt as a workaround in my CLAUDE.md file, but just having a configurable timeout is a great workaround for this

<generalToolUse>
- When using any tools (file editing, MCP etc), always perform SMALL OPERATIONS and prefer multiple operations over one large operation.
- SMALL OPERATIONS means you do not create, or find and replace more than 50 lines, or have arguments for tool uses that are more than 50 lines. 
- BOTH `find` and `replace` (or `old` and `new`) parts of the operation MUST ADHERE to this limit.
- All parameters that are a part of the tool invocation MUST ADHERE to this limit
</generalToolUse>

<!-- A clear and concise description of the bug -->

Steps to Reproduce

As you start using tools with larger and larger parameters you will see a longer latency and response time, eventually leading to timeout. Just asking it to write really long files or summaries will be a fairly consistent way of reproducing this issues.

Expected Behavior

API shouldn't timeout on larger operations.
<!-- What you expected to happen -->

Actual Behavior

API times out.
<!-- What actually happened -->

Additional Context

Happens on Bedrock, haven't tried with other providers.
<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->

View original on GitHub ↗

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