{"record":{"id":"4f6f6bb0b271d05b","repo":"deepseek-ai/deepseek-harness","slug":"cannot-archive-session-sessionid-live-sessio","errorCode":null,"errorMessage":"cannot archive session '${sessionId}': live sessions and session persistence hold no such session","messagePattern":"cannot archive session '(.+?)': live sessions and session persistence hold no such session","errorType":"exception","errorClass":"WorkspaceUnknownSessionError","httpStatus":null,"severity":"error","filePath":"packages/workspace/workspace/src/index.ts","lineNumber":250,"sourceCode":"   */\n  get archivedSessionIds(): readonly SessionId[] {\n    return this.requireState().archivedSessionIds\n  }\n\n  /**\n   * Archive one session durably. The session must exist (live or in session\n   * persistence); its workspace accounting — or lack of one — is irrelevant.\n   * An already archived id resolves without writing.\n   * @param sessionId - The session to archive.\n   * @returns resolution after durability.\n   */\n  archiveSession(sessionId: SessionId): Promise<void> {\n    return this.enqueueOperation(async () => {\n      // The chain slot serializes against every other registry write, so this\n      // check-then-write pair cannot interleave with another archive.\n      if (this.requireState().archivedSessionIds.includes(sessionId)) return\n      if (!(await this.sessionKnown(sessionId))) {\n        throw new WorkspaceUnknownSessionError(sessionId)\n      }\n      const state = this.requireState()\n      await this.setState({ ...state, archivedSessionIds: [...state.archivedSessionIds, sessionId] })\n    })\n  }\n\n  /**\n   * Whether a session is live, header-indexed, or present in a fresh\n   * persistence listing. Only a definite miss returns false — a failing\n   * `sessionPersistence.list()` propagates so storage faults never\n   * masquerade as an unknown session.\n   */\n  private async sessionKnown(id: SessionId): Promise<boolean> {\n    if (this.ctx.get('sessions')?.get(id) !== undefined) return true\n    if (this.headers.has(id)) return true\n    await this.indexHeaders(await this.ctx.sessionPersistence.list())\n    return this.headers.has(id)\n  }","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workspace/workspace/src/index.ts#L232-L268","documentation":"Error \"cannot archive session '${sessionId}': live sessions and session persistence hold no such session\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workspace/workspace/src/index.ts:250 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the session id exists in live sessions or persistence before archiving; refresh state and retry."],"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"}