warpdotdev/warp · error · MergeError
config_too_large
config_too_large
Error message
config_too_large
What it means
Hard size cap enforced before reading: MAX_CONFIG_BYTES is 8 MiB (8*1024*1024, defined at the top of merge_mcp_config.py); if lstat reports st_size above it, config_too_large is raised without reading a byte. Real MCP configs are a few KB, so an oversized 'config' almost always means the wrong file or runaway growth.
Source
Thrown at resources/bundled/skills/tui-migrate-setup/scripts/merge_mcp_config.py:118
document.update(value)
def _read_regular_file(path: Path, *, missing_ok: bool) -> tuple[bytes, int | None]:
try:
metadata = path.lstat()
except FileNotFoundError:
if missing_ok:
return b"", None
raise MergeError("source_config_unavailable")
except OSError as error:
raise MergeError("config_unavailable") from error
if stat.S_ISLNK(metadata.st_mode):
raise MergeError("config_symlink_rejected")
if not stat.S_ISREG(metadata.st_mode):
raise MergeError("config_not_regular_file")
if metadata.st_size > MAX_CONFIG_BYTES:
raise MergeError("config_too_large")
flags = os.O_RDONLY
if hasattr(os, "O_NOFOLLOW"):
flags |= os.O_NOFOLLOW
try:
descriptor = os.open(path, flags)
with os.fdopen(descriptor, "rb") as file:
raw = file.read(MAX_CONFIG_BYTES + 1)
except OSError as error:
raise MergeError("config_unavailable") from error
if len(raw) > MAX_CONFIG_BYTES:
raise MergeError("config_too_large")
return raw, stat.S_IMODE(metadata.st_mode)
def _decode_document(raw: bytes) -> dict[str, Any]:
try:
document = json.loads(raw.decode("utf-8"))View on GitHub (pinned to e72fd7aacb)
Solutions
- Verify you passed the config file, not a neighboring export/log — check with ls -lh
- Inspect what is big (python -m json.tool FILE | less) and strip embedded data blobs that do not belong in an MCP config
- If there is genuinely >8 MiB of server definitions, split into multiple configs — the cap is a deliberate safety limit, not a tunable
Example fix
# before python merge_mcp_config.py --source ~/Downloads/export-with-history.json ... # 40 MB # error: config_too_large # after python merge_mcp_config.py --source ~/.claude.json ... # the actual few-KB config
Defensive patterns
Strategy: validation
Validate before calling
import os
MAX_CONFIG_BYTES = 8 * 1024 * 1024
for p in (source_path, destination_path):
if os.path.exists(p) and os.lstat(p).st_size > MAX_CONFIG_BYTES:
raise SystemExit(f'{p} exceeds the 8 MiB cap — wrong file?') Try / catch
if result.returncode != 0 and 'config_too_large' in result.stderr:
# ls -lh both paths; verify they are the actual configs, not exports/logs
... Prevention
- Keep MCP configs free of embedded data blobs (gallery_data, template dumps)
- Check file size before running the merge
- Split oversized legitimate configs rather than fighting the cap
When it happens
Trigger: Passing a large JSON (export, log, data dump) as --source/--destination; a config bloated by embedded blobs such as gallery_data or template payloads; concatenated duplicate dumps.
Common situations: Wrong path to a big JSON in the same directory; tools appending history into the config; pasting a full export into the config file.
Related errors
- source_config_unavailable
- config_unavailable
- config_not_regular_file
- settings_symlink_rejected
- config_symlink_rejected
AI-assisted analysis of warpdotdev/warp@e72fd7aacb (2026-08-16).
Data as JSON: /api/errors/dfaf4cfff6e3d4e4.
Report an issue: GitHub.