multica-ai/multica · error · Error
Unsupported desktop runtime config schemaVersion: expected 1
Error message
Unsupported desktop runtime config schemaVersion: expected 1
What it means
Wrap thrown by execenv.Prepare when prepareCursorMcpConfig fails for a 'cursor'-provider task. The daemon materializes managed MCP servers into a project-local Cursor config and sets up an isolated per-task CURSOR_DATA_DIR so only servers with approval entries in that data dir can load — preventing user-global MCP servers from leaking into managed runs. Any failure in materializing the config or the data-dir sidecar aborts Prepare.
Source
Thrown at apps/desktop/src/shared/runtime-config.ts:69
}
export function parseRuntimeConfig(raw: string): RuntimeConfig {
let parsed: unknown;
try {
parsed = JSON.parse(raw);
} catch (err) {
throw new Error(
`Invalid desktop runtime config JSON: ${err instanceof Error ? err.message : "parse failed"}`,
);
}
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
throw new Error("Invalid desktop runtime config: expected a JSON object");
}
const obj = parsed as Record<string, unknown>;
if (obj.schemaVersion !== 1) {
throw new Error("Unsupported desktop runtime config schemaVersion: expected 1");
}
const apiUrl = requiredString(obj.apiUrl, "apiUrl");
const appUrl = optionalString(obj.appUrl, "appUrl");
const wsUrl = optionalString(obj.wsUrl, "wsUrl");
const normalizedApiUrl = normalizeHttpUrl(apiUrl, "apiUrl");
return {
schemaVersion: 1,
apiUrl: normalizedApiUrl,
wsUrl: wsUrl ? normalizeWsUrl(wsUrl, "wsUrl") : deriveWsUrl(normalizedApiUrl),
appUrl: appUrl ? normalizeHttpUrl(appUrl, "appUrl") : deriveAppUrl(normalizedApiUrl),
};
}
export function deriveWsUrl(apiUrl: string): string {
const url = new URL(apiUrl);
if (url.protocol === "https:") url.protocol = "wss:";View on GitHub (pinned to 2c0912b6ec)
Solutions
- Read the wrapped error to identify whether the project-local mcp.json write or the CURSOR_DATA_DIR sidecar failed; verify write permissions on workDir and env-root.
- Validate the managed MCP config entries (well-formed names, URLs, transports) before assigning them to the task.
- Ensure the Cursor auth source path exists and is readable by the daemon when the managed config needs auth material.
- Free disk space and retry task preparation.
Defensive patterns
Strategy: validation
Validate before calling
if params.Provider == "cursor" {
if err := validateMcpConfig(params.McpConfig); err != nil {
return fmt.Errorf("invalid managed MCP config: %w", err)
}
if err := checkWritable(workDir); err != nil {
return fmt.Errorf("work dir not writable for cursor mcp config: %w", err)
}
} Try / catch
env, err := execenv.Prepare(ctx, params)
if err != nil && strings.Contains(err.Error(), "prepare cursor mcp config") {
// inspect wrapped error: mcp.json write vs data-dir sidecar; fix perms/config, re-dispatch
} Prevention
- Schema-validate managed MCP entries at configuration time.
- Guarantee the checked-out workDir is writable by the daemon user.
- Version-pin the Cursor tooling so config format expectations stay stable.
When it happens
Trigger: Prepare is called with params.Provider == "cursor" and prepareCursorMcpConfig returns an error — e.g. writing the project-local .cursor/mcp.json or the approval sidecar inside CURSOR_DATA_DIR fails, or reading CursorMcpAuthSource fails.
Common situations: Work directory not writable (checked-out repo owned by another user); malformed params.McpConfig entries that cannot be rendered into Cursor's mcp.json format; a missing or unreadable CursorMcpAuthSource when the config references it; disk-full conditions on the env-root.
Related errors
- Invalid desktop runtime config: expected a JSON object
- Invalid desktop runtime config: ${field} must be a non-empty
- Invalid desktop runtime config: ${field} must be a valid URL
- mint PAT: target API URL not set
- mint PAT: response missing token
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/7dc5ad229bccc32c.
Report an issue: GitHub.