Skip to content
BENIBIX Learn

--settings vs --setting-sources

People think --settings and --setting-sources do one job, and they do not. --settings adds one more layer of settings from a file or a string, and its values win over your files. --setting-sources picks which of your own files load at all: user, project or local. A CI run often uses both.

AI⌨️ Claude Code

--settings Flag

It loads extra settings for one session from JSON.

--settings loads extra settings for this session, from a JSON file or a JSON string. Its values win over the same keys in your settings.json files. Keys it leaves out keep their usual values. Your admin's managed settings still win over it. The file must be a normal file of 2 MiB or less.

Example
Emma's CI keeps one settings file with its own permission rules. Each job starts claude with --settings pointing at it, and no one's own files change.
Why it matters
A run can get its own settings, and no one has to edit the shared files.
Full entry
AI⌨️ Claude Code

--setting-sources Flag

It picks which settings files Claude Code reads.

--setting-sources picks which settings files Claude Code reads: user, project, local, or a mix with commas. A CI job can skip a person's own user settings. Then each run acts the same. Sessions this one starts, such as background sessions and teammates, keep the same list.

Example
Jack's CI should act the same on every runner. It uses --setting-sources project, so only the settings in the repo count.
Why it matters
Runs stop depending on what one person put in their own settings.
Full entry

In one line

--settings Flag
It loads extra settings for one session from JSON.
--setting-sources Flag
It picks which settings files Claude Code reads.