Merges configuration from all sources in priority order. The trusted
user-level env block is applied before the environment-variable layer;
security-sensitive project settings are ignored.
Arguments
- cwd
Character. Working directory (used to locate
.codeagent/settings.jsonandCLAUDE.md). Defaults togetwd().- setting_sources
Which filesystem sources to load, as in the Claude Agent SDK's
setting_sources:"user"–~/.codeagent/settings.json(including itsenvblock) and the user-level~/.claude/CLAUDE.md/~/.codeagent/CLAUDE.md;"project"–<cwd>/.codeagent/settings.jsonand theCLAUDE.md/AGENTS.md/btw.md/llms.txtfiles fromcwdupwards. Default both. A host app that ships its own instructions incwduses"project", so the runtime user's personalsettings.jsonandCLAUDE.mdfiles never reach the app (also when the model is switched). Not covered:CODEAGENT_*variables in~/.Renviron, auto-memory and user-level skill directories, which followCODEAGENT_HOMEand the btw skill paths.