OmniscioGuidesSettings file exceeds the 2MiB limit
Claude Code: settings file exceeds the 2MiB limit
This page is about the one settings source you name on the command line. Which of the four settings files that load on their own wins, and what each one reaches, is on Claude Code settings.json locations and precedence; a policy an administrator pushes to a machine is on Claude Code managed settings.
Last checked against Anthropic's documentation on November 24, 2026. By the Omniscio team. Updated .
What is the exact message?
Error: Settings file exceeds the 2MiB limit: /path/to/settings.jsonA path that is not a regular file gets its own line, followed by the path:
Error: Cannot use settings file (Not a regular file (device, FIFO, or socket))A directory reports an EISDIR reason in the same shape. Both refusals happen at startup, and claude exits with code 1 rather than loading what you pointed it at.
What does it mean?
The file you gave --settings is larger than 2 MiB. That is a limit on the file, not on a key inside it: nothing in the message says which setting is wrong, because the file was never parsed.
Before v2.1.214, Claude Code read the file with no size check, so a multi-gigabyte file, or a device file such as /dev/zero, grew memory without bound. The size and regular-file checks both refuse that case up front.
Both checks belong to the --settings flag, and the message names the file that flag was given. Neither one is a report about the JSON inside it.
How do I fix it?
- Point
--settingsat a regular JSON settings file under 2 MiB. That is the whole fix for the size message. If you never passed the flag yourself, the path in the message names the script, alias or launcher that did. - Or pass the JSON inline. The flag takes "a path to a settings JSON file or an inline JSON string". They are used the same way; the inline form has no file to check and no second copy to keep in step.
- If a script writes the file, stop it growing: the limit is a hard refusal at startup, so a job that appends to its settings file will start failing at the size it crosses 2 MiB.
- If the path is a device, FIFO or socket, that is the second message; a directory reports an
EISDIRreason instead. Give the flag an ordinary file; neither case is about the JSON inside.
One thing worth knowing: values you set with --settings override the same keys in your settings.json files for that session, but most lists merge with theirs, and keys you omit keep their file-based values.
If the session starts and a key is still ignored, the cause is precedence rather than size, and the settings locations page sorts that out. A settings file Claude Code cannot parse is a different failure again, and its message is indexed on Claude Code error messages.
How do I know it is fixed?
claudestarts instead of exiting with code 1, and the message does not appear.- The keys you passed are in effect for that session, in the file or inline, and nothing you omitted has been lost, because keys you leave out keep their file-based values.
Where these answers come from
- Anthropic's error reference, Settings file exceeds the 2MiB limit, read November 24, 2026: the message, the not-a-regular-file and EISDIR variants, the exit code, the v2.1.214 note and the fix.
- CLI reference, read the same day, for the
--settingsrow: a path or an inline JSON string, the 2 MiB and regular-file rule, and how its values merge with your settings files.
Common questions
Is 2 MiB the limit for every settings file?
No. Anthropic documents the limit for the file you pass to --settings. The fix for this message is to point that flag at a regular file under 2 MiB, or to pass the JSON inline, which the flag also accepts.
Can I pass the settings inline instead of in a file?
Yes. Anthropic documents --settings as a path to a settings JSON file or an inline JSON string, so a small set of keys can go on the command line without a file at all. Values set there override the same keys in your settings files for that session, and most lists merge with theirs.
Why does a device or a directory fail too?
Because Claude Code checks that the path is a regular file before it reads it. A device, FIFO or socket is refused with its own message, and a directory reports an EISDIR reason. Point --settings at an ordinary .json file instead.
When a startup error hits every session
This refusal happens before the session starts, so a launch script that passes one oversized file fails the same way every time, in every session it starts.
Omniscio, the desktop app we make for running many Claude Code sessions at once, shows each session's status in the sidebar and keeps the ones that need a decision from you in an inbox at the top of it, so a session that never got going is visible rather than quiet. The features page covers the rest of the app, and the download page has the installers.