{"record":{"id":"dc06abf373ff37da","repo":"deepseek-ai/deepseek-harness","slug":"session-event-type-carries-non-json-serializa","errorCode":null,"errorMessage":"session event \"${type}\" carries non-JSON-serializable data","messagePattern":"session event \"(.+?)\" carries non-JSON-serializable data","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/session/src/index.ts","lineNumber":616,"sourceCode":"   *   to validation and another to storage. The event log is the durable source\n   *   of truth, so a bad event fails at the append site rather than later during\n   *   a backend flush. A synchronous internal dispatch validation failure or an\n   *   append reentered while this acceptance/publication boundary is open also\n   *   rejects before the log changes.\n   */\n  append<T extends SessionEventType>(\n    type: T,\n    data: SessionEventMap[T],\n    ...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)","sourceCodeStart":598,"sourceCodeEnd":634,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/core/session/src/index.ts#L598-L634","documentation":"Error \"session event \"${type}\" carries non-JSON-serializable data\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/core/session/src/index.ts:616 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the session event payload is JSON-serializable before emitting it."],"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"}