# CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK

> Set to 1, it stops the one-piece retry when a stream breaks.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK=1

## Think of it like

It is like you stop a waiter from bringing a dish twice.

## Definition

CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK set to 1 turns off a retry. Claude Code makes it when a stream breaks halfway. It asks again for the whole answer in one piece. Behind some proxies, that retry runs a tool twice. This stops it.

## Example

Emma saw the same file written twice after a dropped stream. Her proxy had made the retry repeat the tool call. This fixed it.

## Example code

```bash
export CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK=1
claude
```

Stop double tool runs behind a proxy.

## Why it matters

Running a tool twice can do real harm, such as sending a message twice.

## Common mistake

Setting it with no proxy trouble. Then a broken stream just fails, with no retry to save it.

## Three principles

- **Stream breaks.** Is when it acts.
- **No one-piece retry.** When set.
- **Stops double runs.** Behind proxies.

## Related terms

- [LLM Streaming](https://learn.benibix.com/term/ai/streaming-response)
- [CLAUDE_CODE_MAX_RETRIES](https://learn.benibix.com/term/ai/claude-code-max-retries-variable)
- [API_TIMEOUT_MS](https://learn.benibix.com/term/ai/api-timeout-ms-variable)

---

Source: https://learn.benibix.com/term/ai/claude-code-disable-nonstreaming-fallback-variable
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
