{"record":{"id":"7ba181cbfee7ea11","repo":"deepseek-ai/deepseek-harness","slug":"sdk-server-is-shutting-down","errorCode":null,"errorMessage":"SDK server is shutting down","messagePattern":"SDK server is shutting down","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/sdk/server/src/server.ts","lineNumber":204,"sourceCode":"   * @param method - the JSON-RPC method name.\n   * @param params - the raw params object from the wire.\n   * @returns the handler's result, to be serialized as the response.\n   */\n  async handleRequest(method: string, params: Record<string, unknown> | undefined): Promise<unknown> {\n    switch (method) {\n      case 'initialize':\n        return this.initialize(params as unknown as InitializeParams)\n      case 'session/prompt':\n        return this.prompt(params as unknown as SessionPromptParams)\n      case 'shutdown':\n        return this.shutdown()\n      default:\n        throw new Error(`unknown DeepSeek Harness SDK runtime method: ${method}`)\n    }\n  }\n\n  private async getOrCreateSession(sessionId: string): Promise<SessionRecord> {\n    if (this.shuttingDown) throw new Error('SDK server is shutting down')\n    const existing = this.sessions.get(sessionId)\n    if (existing) return existing\n    const pending = this.sessionCreations.get(sessionId)\n    if (pending) return pending\n    const creation = this.createSession(sessionId)\n    this.sessionCreations.set(sessionId, creation)\n    void creation.then(\n      () => { this.sessionCreations.delete(sessionId) },\n      () => { this.sessionCreations.delete(sessionId) },\n    )\n    return creation\n  }\n\n  private async createSession(sessionId: string): Promise<SessionRecord> {\n    // No preset composition: this server's compositions keep the model-facing\n    // rows in the host plane, so this agent reads them from the global layer. A\n    // deployment that configures a roster has to join one here first\n    // (@deepseek-ai/dsh-agent-presets README, \"Composing a child agent\").","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/sdk/server/src/server.ts#L186-L222","documentation":"Error \"SDK server is shutting down\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/sdk/server/src/server.ts:204 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Wait for shutdown to complete and start a new server; calls during shutdown are rejected."],"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"}