[BUG] Slow tool_use permission prompts on AWS Bedrock — Claude Code does not use eager_input_streaming on tool definitions

Resolved 💬 5 comments Opened Feb 19, 2026 by MojHnd Closed Mar 25, 2026

Preflight Checklist

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

What's Wrong?

When using Claude Code with AWS Bedrock (CLAUDE_CODE_USE_BEDROCK=1), there is a significant delay (~10-20 seconds) before the permission prompt appears when Claude wants to execute a
tool (e.g., Bash, Write). The same operations show the permission prompt in ~1-3 seconds when using the direct Anthropic API.

The delay occurs specifically between Claude deciding to use a tool and the permission dialog appearing on screen. Text/thinking output streams normally — only the tool_use content
blocks are delayed.

Root cause: Bedrock buffers the entire tool_use JSON block before streaming it to the client. Claude Code cannot display the permission prompt until it receives the complete tool
name and parameters. The fix — eager_input_streaming: true on tool definitions — is now GA on all platforms including Bedrock (per
https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/fine-grained-tool-streaming), but Claude Code does not appear to set this property on its tool definitions when using
Bedrock.

What Should Happen?

Claude Code should set eager_input_streaming: true on all tool definitions when making API requests, especially when using Bedrock. This would enable fine-grained tool streaming (now
GA, no beta header required), reducing the time-to-permission-prompt from ~10-20s to ~1-3s, matching the direct Anthropic API experience.

Per the official docs, this only requires adding "eager_input_streaming": true to each tool definition in the request body. It is supported on Claude API, Amazon Bedrock, Google
Vertex AI, and Microsoft Foundry.

Error Messages/Logs

No error — this is a latency issue. The permission prompt eventually appears, but after a ~10-20 second delay during which the user sees no output (thinking/text streaming has stopped,
  tool_use block is being buffered by Bedrock).

  AWS Bedrock docs confirm the difference:
  - Without fine-grained streaming: ~15s delay, small fragmented chunks
  - With fine-grained streaming: ~3s delay, larger coherent chunks

  Source: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-anthropic-claude-messages-tool-use.html

Steps to Reproduce

  1. Configure Claude Code for AWS Bedrock:

```bash
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_REGION=us-east-1
# (configure Bedrock auth — bearer token, IAM, or SSO)

  1. Start Claude Code and ask it to do something that requires a tool call, e.g.: "run git status"
  2. Observe that after Claude finishes thinking, there is a ~10-20 second pause before the "Allow Bash(git status)?" permission prompt appears
  3. Compare with direct Anthropic API (unset CLAUDE_CODE_USE_BEDROCK) — the same prompt appears in ~1-3 seconds

The delay scales with tool input size — longer commands (e.g., multi-line git commit messages) take even longer.

Claude Model

Not sure / Multiple models

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.47 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

Related issues:

  • #335 (claude-agent-sdk-python) — beta headers like tmp-preserve-thinking-2025-10-01 cause "invalid beta flag" on Bedrock
  • #20031 — CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS doesn't fully remove beta headers
  • #21676 — "invalid beta flag" despite CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1

Proposed fix:
Add "eager_input_streaming": true to all tool definitions in the messages API request body. Per https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/fine-grained-tool-streaming
this is now GA on all platforms with no beta header required. Example:

{
"tools": [
{
"name": "Bash",
"eager_input_streaming": true,
"input_schema": { ... }
}
]
}

This would fix the latency for Bedrock, Vertex AI, and Foundry users without requiring any beta headers.

Environment:

  • WSL2 on Windows (Linux 6.6.87.2-microsoft-standard-WSL2)
  • AWS Bedrock with bearer token auth
  • Cross-region inference (us.anthropic.* model IDs)

View original on GitHub ↗

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