{"record":{"id":"e57474a0a33dd1e9","repo":"deepseek-ai/deepseek-harness","slug":"web-runtime-connection-lost-retry-this-attem","errorCode":null,"errorMessage":"[web-runtime] connection lost, retry #${this.attempt}","messagePattern":"\\[web-runtime\\] connection lost, retry #(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/client/connection/src/client/connection.ts","lineNumber":165,"sourceCode":"        }\n        if (ac.signal.aborted) throw new Error('generation aborted during readiness handshake')\n        this.attempt = 0\n        this.emitState('connected')\n        // A state sink may synchronously stop this controller. Do not publish\n        // a description for a generation that no longer exists afterward.\n        if (this.isGenerationActive(ac)) {\n          this.callSink(() => { this.sinks.onConnected?.(descriptionResult.value) })\n        }\n      } catch {\n        // Transport failure: treat as generation failure, fall through to the shared backoff.\n        if (!ac.signal.aborted) ac.abort()\n      }\n\n      await failed\n      if (!this.isRunning()) return\n      this.emitState('reconnecting')\n      this.attempt += 1\n      console.warn(`[web-runtime] connection lost, retry #${this.attempt}`)\n      const idle = new AbortController()\n      await sleep(this.backoffDelay(this.attempt), idle.signal)\n    }\n  }\n\n  /** Deduplicated state emission (sink isolation applies). */\n  private emitState(state: ConnectionState): void {\n    if (this.lastState === state) return\n    this.lastState = state\n    this.callSink(() => this.sinks.onStateChange?.(state))\n  }\n\n  private async pumpStream<F extends { type: string }>(\n    stream: AsyncIterable<RpcRequest<F>>,\n    sink: ((envelope: RpcRequest<F>) => void) | undefined,\n    onEnd: () => void,\n  ): Promise<void> {\n    try {","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/client/connection/src/client/connection.ts#L147-L183","documentation":"Error \"[web-runtime] connection lost, retry #${this.attempt}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/client/connection/src/client/connection.ts:165 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check network connectivity and that the server is reachable; restart the client if retries exhaust."],"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"}