CLAUDE_CODE_MANAGED_CONFIG_PREFETCH
Updated by Alex Sorokoletov
CLAUDE_CODE_MANAGED_CONFIG_PREFETCH is a Claude Code environment variable: 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. Added in v2.1.292. Added in v2.1.292 and still present in v2.1.332. It is not in the official reference.
| Status | Present in v2.1.332 |
|---|---|
| Added | Added in v2.1.292 |
| 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_MANAGED_CONFIG_PREFETCH=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_MANAGED_CONFIG_PREFETCH": "<value>"
}
}Release notes that mention it
Related variables
CLAUDE_CODE_ARTIFACT_OPENING_PREFETCH: Controls prefetching when an artifact opens; prefetch is disabled when this is set to false.CLAUDE_CODE_CCR_EARLY_HYDRATE_PREFETCH: When a remote SDK session is being resumed, triggers early remote work that prefetches and hydrates reads before initialization finishes.CLAUDE_CODE_CONFIG_LOCK_WAIT_MS: Milliseconds to keep retrying for the config lock when a caller-only lock is in use; defaults to 0.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_HOST_OWNED_CONFIG_DIR: Names a config directory managed by the host application; when it matches the config directory and that config is empty or broken, starts with default settings silently instead of warning.CLAUDE_CODE_RESTRICT_PERSONAL_CONFIG: Limits what a session's own Claude Code files may do.CLAUDE_CONFIG_DIR: Custom config directory.
Frequently asked questions
What does CLAUDE_CODE_MANAGED_CONFIG_PREFETCH do?
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. Added in v2.1.292.
Which Claude Code version has CLAUDE_CODE_MANAGED_CONFIG_PREFETCH?
Added in v2.1.292 and still present in v2.1.332.
How do I set CLAUDE_CODE_MANAGED_CONFIG_PREFETCH?
Export it before starting Claude Code (export CLAUDE_CODE_MANAGED_CONFIG_PREFETCH=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.