{"record":{"id":"a1bd0b5049b50d58","repo":"deepseek-ai/deepseek-harness","slug":"session-append-cannot-reenter-while-another-append","errorCode":null,"errorMessage":"session append cannot reenter while another append is being published","messagePattern":"session append cannot reenter while another append is being published","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/session/src/index.ts","lineNumber":625,"sourceCode":"    ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent] : []\n  ): SessionEvent<T> {\n    const surfaceOpts: SurfaceIntent | undefined = opts[0]\n    const surfaceMetadata = {\n      ...surfaceOpts?.sourceEventSeqs === undefined ? {} : { sourceEventSeqs: surfaceOpts.sourceEventSeqs },\n      ...surfaceOpts?.surfaceOp === undefined ? {} : { surfaceOp: surfaceOpts.surfaceOp },\n    }\n    const dataSnapshot = snapshotJsonValue(data)\n    if (dataSnapshot === undefined) {\n      throw new Error(`session event \"${type}\" carries non-JSON-serializable data`)\n    }\n    assertSupportedRequestHeader(type, dataSnapshot, `session event \"${type}\"`)\n    const surfaceMetadataSnapshot = snapshotJsonValue(surfaceMetadata)\n    if (surfaceMetadataSnapshot === undefined) {\n      throw new Error(`session event \"${type}\" carries non-JSON-serializable surface metadata`)\n    }\n    const entry = attachments.get(this)\n    if (entry?.appending) {\n      throw new Error('session append cannot reenter while another append is being published')\n    }\n    const event = deepFreeze({\n      type,\n      seq: this.log.length,\n      time: Date.now(),\n      data: dataSnapshot,\n      ...(surfaceMetadataSnapshot as { surfaceOp?: unknown; sourceEventSeqs?: unknown }),\n    } as unknown as SessionEvent<T>)\n    this.surfaceManager.validateNext(event as SessionEvent)\n\n    if (entry !== undefined) entry.appending = true\n    try {\n      let callbacks: SessionCallback[] | undefined\n      const callbackArgs: unknown[] = [this, event]\n      if (entry !== undefined) {\n        callbacks = collectSessionCallbacks(entry.emitCtx, [entry.carrier, 'session/event', ...callbackArgs])\n      }\n      this.log.push(event as SessionEvent)","sourceCodeStart":607,"sourceCodeEnd":643,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/core/session/src/index.ts#L607-L643","documentation":"Error \"session append cannot reenter while another append is being published\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/core/session/src/index.ts:625 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}