{"record":{"id":"b5a691f937abc022","repo":"deepseek-ai/deepseek-harness","slug":"sessionid-must-be-a-non-empty-string","errorCode":null,"errorMessage":"sessionId must be a non-empty string","messagePattern":"sessionId must be a non-empty string","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/terminal/tool-terminal/src/index.ts","lineNumber":124,"sourceCode":"} as const\n\nconst BACKGROUND_TASK_OUTPUT_SCHEMA = {\n  type: 'object',\n  additionalProperties: false,\n  properties: {\n    kind: { type: 'string', required: true, const: 'background' },\n    jobId: { type: 'string', required: true },\n  },\n} as const\n\nfunction requireAgent(agent: Agent | undefined): Agent {\n  if (agent === undefined) throw new Error('terminal tools require an initiating agent')\n  return agent\n}\n\nfunction sessionId(args: SessionArgs): TerminalSessionIdType {\n  if (args.sessionId.length === 0) {\n    throw new Error('sessionId must be a non-empty string')\n  }\n  return TerminalSessionId(args.sessionId)\n}\n\nfunction textResult(text: string, maxBytes: number): ContentBlock[] {\n  return [{ type: 'text', text: boundTerminalText(text, maxBytes) }]\n}\n\nfunction rawContentText(content: readonly ContentBlock[]): string | undefined {\n  if (content.length !== 1) return undefined\n  const block = content[0]\n  return block?.type === 'text' ? block.text : undefined\n}\n\nfunction sendDetail(result: TerminalSendResult): string {\n  return result.sessionStatus.kind === 'running'\n    ? `wait: ${result.waitReason}`\n    : `session exited: ${result.sessionStatus.exitCode ?? result.sessionStatus.signal ?? 'unknown'}`","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/terminal/tool-terminal/src/index.ts#L106-L142","documentation":"Error \"sessionId must be a non-empty string\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/terminal/tool-terminal/src/index.ts:124 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-empty sessionId string."],"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"}