multica-ai/multica · error

execenv: prepare cursor mcp config: %w

Error message

execenv: prepare cursor mcp config: %w

What it means

Error "execenv: prepare cursor mcp config: %w" thrown in multica-ai/multica.

Source

Thrown at server/internal/daemon/execenv/execenv.go:559

	// For Reasonix, deny the `ask` tool for this task through a project-scoped
	// reasonix.toml. Degraded, not fatal: without it the task still runs under
	// the backend's fail-closed question handling.
	if params.Provider == "reasonix" {
		if err := writeReasonixProjectConfig(workDir, params.ReasonixEnv, manifest, logger); err != nil {
			logger.Warn("execenv: write reasonix project config failed", "error", err)
		}
	}

	// For Cursor, materialize managed MCP into project-local config and use
	// an isolated CURSOR_DATA_DIR for the per-workdir approval sidecar. Cursor
	// still reads ~/.cursor/mcp.json, but only servers with approval entries in
	// this per-task data dir can load, so user-global MCP servers do not leak
	// into managed-MCP runs.
	if params.Provider == "cursor" {
		cursorDataDir, err := prepareCursorMcpConfig(envRoot, workDir, params.McpConfig, params.CursorMcpAuthSource, manifest)
		if err != nil {
			return nil, fmt.Errorf("execenv: prepare cursor mcp config: %w", err)
		}
		env.CursorDataDir = cursorDataDir
	}

	if err := writeSidecarManifest(envRoot, manifest); err != nil {
		// In place the manifest is the ONLY record of what we wrote into the
		// user's own directory, so losing it strands the sidecar tree there
		// permanently — no crash required, a disk or permission hiccup is
		// enough (MUL-6132). Fail so the rollback registered above removes the
		// tree now, while we still hold the in-memory manifest. Elsewhere the
		// manifest is a convenience the GC can do without, so a warning stays
		// the right response.
		if params.LocalWorkDir != "" {
			return nil, fmt.Errorf("execenv: write sidecar manifest: %w", err)
		}
		logger.Warn("execenv: write sidecar manifest failed (non-fatal)", "error", err)
	}

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Inspect the wrapped error from cursor mcp config preparation.

When it happens

Trigger: Thrown at server/internal/daemon/execenv/execenv.go:559 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/6da3cd46f63ce743. Report an issue: GitHub.