CLAUDE_CODE_CONFIG_LOCK_WAIT_MS
Updated by Alex Sorokoletov
CLAUDE_CODE_CONFIG_LOCK_WAIT_MS is a Claude Code environment variable: Milliseconds to keep retrying for the config lock when a caller-only lock is in use; defaults to 0. Added in v2.1.318 and still present in v2.1.318. It is not in the official reference.
| Status | Present in v2.1.318 |
|---|---|
| Added | Added in v2.1.318 |
| Category | Other |
| Official docs | Not listed |
How to set it
For one session, export it in the shell that starts Claude Code:
export CLAUDE_CODE_CONFIG_LOCK_WAIT_MS=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_CONFIG_LOCK_WAIT_MS": "<value>"
}
}Release notes that mention it
- Claude Code Version Tracker: Undocumented Env Vars, Feature Gates & Models
- claude-code-env-vars-v2-1-318
Related variables
CLAUDE_CODE_CONFIG_PROBE: Marks the run as an IDE config probe; when set, the AWS and GCP auth refreshes are skipped.CLAUDE_CODE_CONFIG_WATCH_EVENTS: On Linux, when set, watches config files with filesystem events instead of interval polling; ignored on other platforms.CLAUDE_CODE_FLAG_FETCH_WAIT_MS: Milliseconds to wait for the feature-flag fetch to return before giving up; defaults to 3000.CLAUDE_CODE_MANAGED_CONFIG_PREFETCH: Turns on a hedged prefetch of the organization's managed settings during startup, so the first managed-settings fetch runs earlier in the launch sequence.CLAUDE_CODE_RESTRICT_PERSONAL_CONFIG: Limits what a session's own Claude Code files may do.CLAUDE_CONFIG_DIR: Custom config directory.CLAUDE_SECURESTORAGE_CONFIG_DIR: Sets the directory for secure credential storage, using ~/.claude when set to an empty string and a default location when unset; the value is passed to child processes.GIT_CONFIG_COUNT
Frequently asked questions
What does CLAUDE_CODE_CONFIG_LOCK_WAIT_MS do?
Milliseconds to keep retrying for the config lock when a caller-only lock is in use; defaults to 0.
Which Claude Code version has CLAUDE_CODE_CONFIG_LOCK_WAIT_MS?
Added in v2.1.318 and still present in v2.1.318.
How do I set CLAUDE_CODE_CONFIG_LOCK_WAIT_MS?
Export it before starting Claude Code (export CLAUDE_CODE_CONFIG_LOCK_WAIT_MS=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.