{"record":{"id":"b441e127868b8ea7","repo":"deepseek-ai/deepseek-harness","slug":"session-already-exists","errorCode":"SESSION_ALREADY_EXISTS","errorMessage":"session \"${childSessionId}\" already exists","messagePattern":"session \"(.+?)\" already exists","errorType":"exception","errorClass":"SessionForkError","httpStatus":null,"severity":"error","filePath":"packages/core/session/src/index.ts","lineNumber":1083,"sourceCode":"  }\n\n  /**\n   * Create a live child session from a stable prefix of a live source.\n   * `boundary` is an inclusive source event seq; omitted means the source's\n   * current last event. The selected slice may end with a between-turn event\n   * but must not end inside an open turn.\n   *\n   * @param source - Live source session object or id.\n   * @param boundary - Inclusive source event seq to fork through; omitted means\n   *   the source's current last event, and omitted on an empty source forks an\n   *   empty child.\n   * @param childSessionId - Optional child session id; omitted delegates to\n   *   `SessionStore`'s id policy.\n   * @returns The created live child session.\n   */\n  fork(source: SessionForkSource, boundary?: number, childSessionId?: SessionId): Session {\n    if (childSessionId !== undefined && this.get(childSessionId) !== undefined) {\n      throw new SessionForkError(`session \"${childSessionId}\" already exists`, 'SESSION_ALREADY_EXISTS')\n    }\n    const liveSource = this._resolveForkSource(source)\n    const seed = this._forkSeed(liveSource, boundary)\n    return this.create(childSessionId, {\n      seed,\n      meta: {\n        ...liveSource.header.cwd !== undefined ? { cwd: liveSource.header.cwd } : {},\n        parentSession: liveSource.id,\n        seedLength: seed.length,\n      },\n    })\n  }\n\n  private _forkSeed(session: Session, requestedBoundary: number | undefined): SessionEvent[] {\n    const events = session.events\n    const lastEvent = events.at(-1)\n    let boundary: number\n    if (requestedBoundary !== undefined) {","sourceCodeStart":1065,"sourceCodeEnd":1101,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/core/session/src/index.ts#L1065-L1101","documentation":"Error \"session \"${childSessionId}\" already exists\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/core/session/src/index.ts:1083 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"}