{"record":{"id":"52807cfe9b329041","repo":"deepseek-ai/deepseek-harness","slug":"workspace-invalid-path","errorCode":"workspace-invalid-path","errorMessage":"cannot create a workspace at \"${path}\": ${error instanceof Error ? error.message : String(error)}","messagePattern":"cannot create a workspace at \"(.+?)\": (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/host/apiproxy/src/api-proxy.ts","lineNumber":2719,"sourceCode":"\n    workspace: {\n      list(request) {\n        return Promise.resolve(ok(request, {\n          items: ctx.workspaceRegistry.list().map(workspaceView),\n          archivedSessionIds: [...ctx.workspaceRegistry.archivedSessionIds],\n        }))\n      },\n\n      async create(request) {\n        const { path } = request.payload\n        try {\n          const { workspace, created } = await ensureWorkspace(path)\n          return ok(request, { workspace: workspaceView(workspace), created })\n        } catch (error: unknown) {\n          // The registry rejects a path that does not resolve to an existing\n          // directory (realpath ENOENT / not-a-directory) — the business\n          // error of the typed-path flow, surfaced as a validation failure.\n          return err(request, {\n            code: 'workspace-invalid-path',\n            message: `cannot create a workspace at \"${path}\": ${error instanceof Error ? error.message : String(error)}`,\n            details: { path },\n          })\n        }\n      },\n\n      async rename(request) {\n        const { payload } = request\n        const workspace = ctx.workspaceRegistry.get(brandWorkspaceId(payload.workspaceId))\n        if (workspace === undefined) return workspaceNotFound(request, payload.workspaceId)\n        const title = payload.title.trim()\n        // Uniqueness AND the same-title no-op both ride the create chain so\n        // they observe the state left by earlier queued renames — checked\n        // up front, a queued A→A could report success while an earlier A→B\n        // still lands afterwards.\n        const operation = workspaceCreationChain.then(async () => {\n          if (title === workspace.title) return","sourceCodeStart":2701,"sourceCodeEnd":2737,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/host/apiproxy/src/api-proxy.ts#L2701-L2737","documentation":"Error \"cannot create a workspace at \"${path}\": ${error instanceof Error ? error.message : String(error)}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/host/apiproxy/src/api-proxy.ts:2719 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the path per the embedded error (not a directory, permissions), then create the workspace again."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}