deepseek-ai/deepseek-harness · error

workspace-invalid-path

workspace-invalid-path

Error message

cannot create a workspace at "${path}": ${error instanceof Error ? error.message : String(error)}

What it means

Error "cannot create a workspace at "${path}": ${error instanceof Error ? error.message : String(error)}" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/host/apiproxy/src/api-proxy.ts:2719

    workspace: {
      list(request) {
        return Promise.resolve(ok(request, {
          items: ctx.workspaceRegistry.list().map(workspaceView),
          archivedSessionIds: [...ctx.workspaceRegistry.archivedSessionIds],
        }))
      },

      async create(request) {
        const { path } = request.payload
        try {
          const { workspace, created } = await ensureWorkspace(path)
          return ok(request, { workspace: workspaceView(workspace), created })
        } catch (error: unknown) {
          // The registry rejects a path that does not resolve to an existing
          // directory (realpath ENOENT / not-a-directory) — the business
          // error of the typed-path flow, surfaced as a validation failure.
          return err(request, {
            code: 'workspace-invalid-path',
            message: `cannot create a workspace at "${path}": ${error instanceof Error ? error.message : String(error)}`,
            details: { path },
          })
        }
      },

      async rename(request) {
        const { payload } = request
        const workspace = ctx.workspaceRegistry.get(brandWorkspaceId(payload.workspaceId))
        if (workspace === undefined) return workspaceNotFound(request, payload.workspaceId)
        const title = payload.title.trim()
        // Uniqueness AND the same-title no-op both ride the create chain so
        // they observe the state left by earlier queued renames — checked
        // up front, a queued A→A could report success while an earlier A→B
        // still lands afterwards.
        const operation = workspaceCreationChain.then(async () => {
          if (title === workspace.title) return

View on GitHub (pinned to b150a551b8)

Solutions

  1. Fix the path per the embedded error (not a directory, permissions), then create the workspace again.

When it happens

Trigger: Thrown at packages/host/apiproxy/src/api-proxy.ts:2719 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/52807cfe9b329041. Report an issue: GitHub.