CLAUDE_CODE_HOST_OWNED_CONFIG_DIR

Updated by

CLAUDE_CODE_HOST_OWNED_CONFIG_DIR is a Claude Code environment variable: 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. Added in v2.1.321 and still present in v2.1.321. It is not in the official reference.

StatusPresent in v2.1.321
AddedAdded in v2.1.321
CategoryOther
Official docsNot listed

How to set it

For one session, export it in the shell that starts Claude Code:

export CLAUDE_CODE_HOST_OWNED_CONFIG_DIR=<value>
claude

To apply it to every session, add it to the env object of a settings file:

// ~/.claude/settings.json
{
  "env": {
    "CLAUDE_CODE_HOST_OWNED_CONFIG_DIR": "<value>"
  }
}

Release notes that mention it

Related variables

  • 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.
  • CLAUDE_ARTIFACT_HOST_GRANT: Supplies the local-server host grant for artifact publishing, controlling which local MCP servers a published artifact may reach through callTool and watchTool.
  • CLAUDE_CODE_AUTOUPDATER_DISABLED_BY_HOST: When set, treats the autoupdater as disabled by the host, so plugin autoupdate follows the host's pin and is skipped when the pin gives a reason; FORCE_AUTOUPDATE_PLUGINS overrides it.
  • 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_DIR_SYNC_ARCHIVE: Enabled the archive engine of directory sync, keeping archived copies alongside synced files; read until v2.1.245.

Frequently asked questions

What does CLAUDE_CODE_HOST_OWNED_CONFIG_DIR do?

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.

Which Claude Code version has CLAUDE_CODE_HOST_OWNED_CONFIG_DIR?

Added in v2.1.321 and still present in v2.1.321.

How do I set CLAUDE_CODE_HOST_OWNED_CONFIG_DIR?

Export it before starting Claude Code (export CLAUDE_CODE_HOST_OWNED_CONFIG_DIR=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.