[DOCS] Error and env var docs omit `CLAUDE_CODE_MAX_RETRIES` cap and retry watchdog guidance
Documentation Type
Incorrect/outdated documentation
Documentation Location
https://code.claude.com/docs/en/errors
Section/Topic
"Automatic retries" and the CLAUDE_CODE_MAX_RETRIES environment variable
Current Documentation
The Errors page currently says:
"Claude Code retries transient failures before showing you an error. Server errors, overloaded responses, request timeouts, temporary 429 throttles, and dropped connections are all retried up to 10 times with exponential backoff."
The retry table says:
"CLAUDE_CODE_MAX_RETRIES | 10 | Number of retry attempts. Lower it to surface failures faster in scripts; raise it to wait through longer incidents."
The environment variables page says:
"CLAUDE_CODE_MAX_RETRIES | Override the number of times to retry failed API requests (default: 10)"
What's Wrong or Missing?
Claude Code v2.1.186 changed CLAUDE_CODE_MAX_RETRIES so it caps at 15. The release also says unattended sessions should use CLAUDE_CODE_RETRY_WATCHDOG instead.
The docs currently imply users can raise CLAUDE_CODE_MAX_RETRIES without documenting the cap, and they do not document CLAUDE_CODE_RETRY_WATCHDOG.
Suggested Improvement
Update the Errors page and env var reference to state:
CLAUDE_CODE_MAX_RETRIESdefaults to 10 and is capped at 15.- Values above 15 are treated as 15 or rejected, depending on actual runtime behavior.
- For unattended sessions that need a broader retry window, use
CLAUDE_CODE_RETRY_WATCHDOG.
Add CLAUDE_CODE_RETRY_WATCHDOG to the environment variables table with its expected format, default, and when to use it.
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/errors | Automatic retry behavior and tuning |
| https://code.claude.com/docs/en/env-vars | Environment variable reference |
Total scope: 2 pages affected