deepseek-ai/deepseek-harness · error · LspError
LSP_WORKSPACE_REQUIRED
LSP_WORKSPACE_REQUIRED
Error message
the lsp tool requires a session workspace cwd
What it means
Error "the lsp tool requires a session workspace cwd" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/lsp/tool-lsp/src/index.ts:184
},
render: (_args, value) => {
switch (value.kind) {
case 'locations':
return [{ type: 'text', text: formatLocations(value.locations, value.resolvedWorkspaceUri, resolved.maxLocations, resolved.maxResultChars) }]
case 'hover':
return [{ type: 'text', text: formatHover(value.hover, resolved.maxResultChars) }]
/* v8 ignore next -- exhaustive over the output schema's closed union; unreachable. */
default:
return assertNever(value, 'tool-lsp output')
}
},
},
timeoutMs: resolved.timeoutMs,
async execute(args, exec) {
const input = parseLspArgs(args)
const workspaceRoot = sessionCwd(exec)
if (workspaceRoot === undefined) {
throw new LspError('the lsp tool requires a session workspace cwd', 'LSP_WORKSPACE_REQUIRED')
}
const result = await ctx.lsp.query({
operation: input.operation,
filePath: input.filePath,
position: input.position,
workspaceRoot,
}, exec.signal)
switch (result.kind) {
case 'locations':
return {
kind: 'locations' as const,
locations: result.locations.map(location => ({
uri: location.uri,
range: {
start: { line: location.range.start.line, character: location.range.start.character },
end: { line: location.range.end.line, character: location.range.end.character },
},
})),View on GitHub (pinned to b150a551b8)
Solutions
- Run the lsp tool in a session that has a workspace cwd.
When it happens
Trigger: Thrown at packages/lsp/tool-lsp/src/index.ts:184 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/be2e579218e41fc0.
Report an issue: GitHub.