CLAUDE_CODE_DISABLE_STREAM_DAMAGE_CHECK
Updated by Alex Sorokoletov
CLAUDE_CODE_DISABLE_STREAM_DAMAGE_CHECK is a Claude Code environment variable: Set to 1 to turn off the check that fails a model response when its stream looks damaged. The in-product warning notes that with the check off, a tool could then run on incomplete input. Added in v2.1.337 and still present in v2.1.337. It is not in the official reference.
| Status | Present in v2.1.337 |
|---|---|
| Added | Added in v2.1.337 |
| Category | Network and proxy |
| Official docs | Not listed |
How to set it
For one session, export it in the shell that starts Claude Code:
export CLAUDE_CODE_DISABLE_STREAM_DAMAGE_CHECK=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_DISABLE_STREAM_DAMAGE_CHECK": "<value>"
}
}Release notes that mention it
Related variables
CLAUDE_CODE_DISABLE_MEMORY_STREAM_LIST: Turns off the incremental metadata-streaming path inside multi-store memory sync.CLAUDE_BYTE_STREAM_IDLE_TIMEOUT_MSCLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUTCLAUDE_CODE_DISABLE_MTLS_RELOAD_ON_STALE_CONNECTIONCLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK: Disables the fallback path that retries failed streaming requests as non-streaming calls.CLAUDE_CODE_DISABLE_PROXY_SCHEME_REPAIRCLAUDE_CODE_DISABLE_REFUSAL_RETRY: Turns off the automatic retry Claude Code attempts after a flag.CLAUDE_CODE_STREAM_EVENT_NO_SUBSCRIBER_HOLD_MS: Milliseconds to hold a stream event when nothing is subscribed; used only when CLAUDE_CODE_STREAM_EVENT_HOLD_MS is also set.
Frequently asked questions
What does CLAUDE_CODE_DISABLE_STREAM_DAMAGE_CHECK do?
Set to 1 to turn off the check that fails a model response when its stream looks damaged. The in-product warning notes that with the check off, a tool could then run on incomplete input.
Which Claude Code version has CLAUDE_CODE_DISABLE_STREAM_DAMAGE_CHECK?
Added in v2.1.337 and still present in v2.1.337.
How do I set CLAUDE_CODE_DISABLE_STREAM_DAMAGE_CHECK?
Export it before starting Claude Code (export CLAUDE_CODE_DISABLE_STREAM_DAMAGE_CHECK=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.
All variables, searchable: Claude Code environment variables.