{"record":{"id":"b0a7ab93cce554f6","repo":"multica-ai/multica","slug":"write-cursor-workspace-trust-w","errorCode":null,"errorMessage":"write cursor workspace trust: %w","messagePattern":"write cursor workspace trust: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/cursor_mcp.go","lineNumber":108,"sourceCode":"\t\treturn \"\", err\n\t}\n\tapprovalData, err := json.MarshalIndent(approvals, \"\", \"  \")\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"marshal cursor mcp approvals: %w\", err)\n\t}\n\tif err := os.WriteFile(filepath.Join(projectDataDir, \"mcp-approvals.json\"), approvalData, 0o600); err != nil {\n\t\treturn \"\", fmt.Errorf(\"write cursor mcp approvals: %w\", err)\n\t}\n\ttrustData, err := json.MarshalIndent(map[string]string{\n\t\t\"trustedAt\":     \"1970-01-01T00:00:00Z\",\n\t\t\"workspacePath\": projectRoot,\n\t\t\"trustMethod\":   \"multica-managed\",\n\t}, \"\", \"  \")\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"marshal cursor workspace trust: %w\", err)\n\t}\n\tif err := os.WriteFile(filepath.Join(projectDataDir, cursorWorkspaceTrustedFile), trustData, 0o600); err != nil {\n\t\treturn \"\", fmt.Errorf(\"write cursor workspace trust: %w\", err)\n\t}\n\tif strings.TrimSpace(mcpAuthSource) != \"\" {\n\t\tif err := seedCursorMcpAuthFile(projectDataDir, mcpAuthSource); err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t}\n\n\treturn cursorDataDir, nil\n}\n\nfunc seedCursorMcpAuthFile(projectDataDir, source string) error {\n\tsourcePath, err := resolveCursorMcpAuthSource(source)\n\tif err != nil {\n\t\treturn err\n\t}\n\ttarget := filepath.Join(projectDataDir, cursorMcpAuthFile)\n\tif err := os.Symlink(sourcePath, target); err == nil {\n\t\treturn nil","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/cursor_mcp.go#L90-L126","documentation":"Error \"write cursor workspace trust: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/cursor_mcp.go:108 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check permissions to write the cursor workspace trust file."],"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"}