warpdotdev/warp · error · MergeError
source_config_unavailable
source_config_unavailable
Error message
source_config_unavailable
What it means
Raised by _read_regular_file() when lstat() on the config path raises FileNotFoundError and the caller passed missing_ok=False — the file is required and absent. (In the current merge_mcp_config.py, load_config() passes missing_ok=True, so an absent file is tolerated as an empty config; this code enforces the required-source contract for stricter callers of the helper.)
Source
Thrown at resources/bundled/skills/tui-migrate-setup/scripts/merge_mcp_config.py:109
child = current.get(segment)
if not isinstance(child, dict):
child = {}
current[segment] = child
current = child
if path:
current[path[-1]] = value
else:
document.clear()
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:View on GitHub (pinned to e72fd7aacb)
Solutions
- Check the path component by component (ls the parent directory) and correct the --source argument
- If the source legitimately does not exist there is nothing to merge — create it via the owning app or point at the real config location
- Verify $HOME / user context resolves to the expected home when the path is built from ~
Example fix
# before python merge_mcp_config.py --source ~/.claude/mcp.json --destination ... # file never existed # error: source_config_unavailable # after python merge_mcp_config.py --source ~/.claude.json --destination ... # actual config location
Defensive patterns
Strategy: validation
Validate before calling
import os
if not os.path.exists(source_path):
raise SystemExit(f'source config missing: {source_path}') Try / catch
if result.returncode != 0 and 'source_config_unavailable' in result.stderr:
# the required source file is absent — fix the --source path and retry
... Prevention
- Verify the source config path exists before invoking
- Resolve ~ explicitly against the intended home directory
- Distinguish 'not created yet' from 'wrong path' before migrating
When it happens
Trigger: lstat reports ENOENT while missing_ok=False: the --source path does not exist (or its parent directory is gone), e.g. pointing at a Warp MCP config location that was never created on this machine.
Common situations: First run on a machine where the GUI MCP config was never written; wrong path passed via --source; home-directory resolution differences (launchd/systemd/root vs interactive user).
Related errors
- config_unavailable
- config_not_regular_file
- config_too_large
- Failed to read attachment file '{}': {e}
- Failed to create temp file '{prefix}': {e}
AI-assisted analysis of warpdotdev/warp@e72fd7aacb (2026-08-16).
Data as JSON: /api/errors/55e05e0fb16ec917.
Report an issue: GitHub.