{"record":{"id":"be2e579218e41fc0","repo":"deepseek-ai/deepseek-harness","slug":"lsp-workspace-required","errorCode":"LSP_WORKSPACE_REQUIRED","errorMessage":"the lsp tool requires a session workspace cwd","messagePattern":"the lsp tool requires a session workspace cwd","errorType":"exception","errorClass":"LspError","httpStatus":null,"severity":"error","filePath":"packages/lsp/tool-lsp/src/index.ts","lineNumber":184,"sourceCode":"      },\n      render: (_args, value) => {\n        switch (value.kind) {\n          case 'locations':\n            return [{ type: 'text', text: formatLocations(value.locations, value.resolvedWorkspaceUri, resolved.maxLocations, resolved.maxResultChars) }]\n          case 'hover':\n            return [{ type: 'text', text: formatHover(value.hover, resolved.maxResultChars) }]\n          /* v8 ignore next -- exhaustive over the output schema's closed union; unreachable. */\n          default:\n            return assertNever(value, 'tool-lsp output')\n        }\n      },\n    },\n    timeoutMs: resolved.timeoutMs,\n    async execute(args, exec) {\n      const input = parseLspArgs(args)\n      const workspaceRoot = sessionCwd(exec)\n      if (workspaceRoot === undefined) {\n        throw new LspError('the lsp tool requires a session workspace cwd', 'LSP_WORKSPACE_REQUIRED')\n      }\n      const result = await ctx.lsp.query({\n        operation: input.operation,\n        filePath: input.filePath,\n        position: input.position,\n        workspaceRoot,\n      }, exec.signal)\n      switch (result.kind) {\n        case 'locations':\n          return {\n            kind: 'locations' as const,\n            locations: result.locations.map(location => ({\n              uri: location.uri,\n              range: {\n                start: { line: location.range.start.line, character: location.range.start.character },\n                end: { line: location.range.end.line, character: location.range.end.character },\n              },\n            })),","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/lsp/tool-lsp/src/index.ts#L166-L202","documentation":"Error \"the lsp tool requires a session workspace cwd\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/lsp/tool-lsp/src/index.ts:184 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run the lsp tool in a session that has a workspace cwd."],"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"}