{"record":{"id":"6da3cd46f63ce743","repo":"multica-ai/multica","slug":"execenv-prepare-cursor-mcp-config-w","errorCode":null,"errorMessage":"execenv: prepare cursor mcp config: %w","messagePattern":"execenv: prepare cursor mcp config: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/execenv.go","lineNumber":559,"sourceCode":"\n\t// For Reasonix, deny the `ask` tool for this task through a project-scoped\n\t// reasonix.toml. Degraded, not fatal: without it the task still runs under\n\t// the backend's fail-closed question handling.\n\tif params.Provider == \"reasonix\" {\n\t\tif err := writeReasonixProjectConfig(workDir, params.ReasonixEnv, manifest, logger); err != nil {\n\t\t\tlogger.Warn(\"execenv: write reasonix project config failed\", \"error\", err)\n\t\t}\n\t}\n\n\t// For Cursor, materialize managed MCP into project-local config and use\n\t// an isolated CURSOR_DATA_DIR for the per-workdir approval sidecar. Cursor\n\t// still reads ~/.cursor/mcp.json, but only servers with approval entries in\n\t// this per-task data dir can load, so user-global MCP servers do not leak\n\t// into managed-MCP runs.\n\tif params.Provider == \"cursor\" {\n\t\tcursorDataDir, err := prepareCursorMcpConfig(envRoot, workDir, params.McpConfig, params.CursorMcpAuthSource, manifest)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"execenv: prepare cursor mcp config: %w\", err)\n\t\t}\n\t\tenv.CursorDataDir = cursorDataDir\n\t}\n\n\tif err := writeSidecarManifest(envRoot, manifest); err != nil {\n\t\t// In place the manifest is the ONLY record of what we wrote into the\n\t\t// user's own directory, so losing it strands the sidecar tree there\n\t\t// permanently — no crash required, a disk or permission hiccup is\n\t\t// enough (MUL-6132). Fail so the rollback registered above removes the\n\t\t// tree now, while we still hold the in-memory manifest. Elsewhere the\n\t\t// manifest is a convenience the GC can do without, so a warning stays\n\t\t// the right response.\n\t\tif params.LocalWorkDir != \"\" {\n\t\t\treturn nil, fmt.Errorf(\"execenv: write sidecar manifest: %w\", err)\n\t\t}\n\t\tlogger.Warn(\"execenv: write sidecar manifest failed (non-fatal)\", \"error\", err)\n\t}\n","sourceCodeStart":541,"sourceCodeEnd":577,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/execenv.go#L541-L577","documentation":"Error \"execenv: prepare cursor mcp config: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/execenv.go:559 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error from cursor mcp config preparation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}