{"record":{"id":"3d1aacb7ff6aacba","repo":"deepseek-ai/deepseek-harness","slug":"open-turn","errorCode":"OPEN_TURN","errorMessage":"fork boundary ${boundary} in session \"${session.id}\" ends inside open turn ${lastTurnBoundary.data.turn}","messagePattern":"fork boundary (.+?) in session \"(.+?)\" ends inside open turn (.+?)","errorType":"validation","errorClass":"SessionForkError","httpStatus":null,"severity":"error","filePath":"packages/core/session/src/index.ts","lineNumber":1131,"sourceCode":"    if (boundary >= events.length) {\n      const lastSeq = events.at(-1)?.seq\n      throw new SessionForkError(\n        `fork boundary ${boundary} does not exist in session \"${session.id}\" (last seq: ${lastSeq ?? 'none'})`,\n        'INVALID_BOUNDARY',\n      )\n    }\n\n    const boundaryEvent = events[boundary]\n    if (boundaryEvent === undefined || boundaryEvent.seq !== boundary) {\n      throw new SessionForkError(\n        `fork boundary ${boundary} does not match a contiguous event seq in session \"${session.id}\"`,\n        'INVALID_BOUNDARY',\n      )\n    }\n    const lastTurnBoundary = events.slice(0, boundary + 1)\n      .findLast(event => event.type === 'turn/start' || event.type === 'turn/end')\n    if (lastTurnBoundary?.type === 'turn/start') {\n      throw new SessionForkError(\n        `fork boundary ${boundary} in session \"${session.id}\" ends inside open turn ${lastTurnBoundary.data.turn}`,\n        'OPEN_TURN',\n      )\n    }\n\n    return events.slice(0, boundary + 1)\n  }\n\n  private _resolveForkSource(source: SessionForkSource): Session {\n    if (typeof source === 'string') {\n      const session = this.get(source)\n      if (session === undefined) throw new SessionForkError(`session \"${source}\" not found`, 'SESSION_NOT_FOUND')\n      return session\n    }\n\n    const live = this.get(source.id)\n    if (live === undefined) {\n      throw new SessionForkError(`session \"${source.id}\" not found`, 'SESSION_NOT_FOUND')","sourceCodeStart":1113,"sourceCodeEnd":1149,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/core/session/src/index.ts#L1113-L1149","documentation":"Error \"fork boundary ${boundary} in session \"${session.id}\" ends inside open turn ${lastTurnBoundary.data.turn}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/core/session/src/index.ts:1131 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"}