CLAUDE_CODE_DISABLE_REFUSAL_RETRY
Updated by Alex Sorokoletov
CLAUDE_CODE_DISABLE_REFUSAL_RETRY is a Claude Code environment variable. Added between v2.1.269 and v2.1.283 and still present in v2.1.295. It is not in the official reference.
| Status | Present in v2.1.295 |
|---|---|
| Added | Added between v2.1.269 and v2.1.283 |
| 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_REFUSAL_RETRY=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_DISABLE_REFUSAL_RETRY": "<value>"
}
}Related variables
CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUTCLAUDE_CODE_DISABLE_MEMORY_STREAM_LIST: Turns off the incremental metadata-streaming path inside multi-store memory sync.CLAUDE_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_OVERLOADED_RETRY_BASE_DELAY_MS: Sets the base delay, in milliseconds, for the backoff when a request comes back overloaded (HTTP 529).CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MSCLAUDE_CODE_RETRY_WATCHDOG: Tunes the retry watchdog that detects API calls silently looping without progress.CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS: Caps the total time unattended retry mode (CLAUDE_CODE_RETRY_WATCHDOG) waits through 429 and 529 responses.
Frequently asked questions
Which Claude Code version has CLAUDE_CODE_DISABLE_REFUSAL_RETRY?
Added between v2.1.269 and v2.1.283 and still present in v2.1.295.
How do I set CLAUDE_CODE_DISABLE_REFUSAL_RETRY?
Export it before starting Claude Code (export CLAUDE_CODE_DISABLE_REFUSAL_RETRY=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.