deepseek-ai/deepseek-harness · error · WorkspaceUnknownSessionError

cannot archive session '${sessionId}': live sessions and ses

Error message

cannot archive session '${sessionId}': live sessions and session persistence hold no such session

What it means

Error "cannot archive session '${sessionId}': live sessions and session persistence hold no such session" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/workspace/workspace/src/index.ts:250

   */
  get archivedSessionIds(): readonly SessionId[] {
    return this.requireState().archivedSessionIds
  }

  /**
   * Archive one session durably. The session must exist (live or in session
   * persistence); its workspace accounting — or lack of one — is irrelevant.
   * An already archived id resolves without writing.
   * @param sessionId - The session to archive.
   * @returns resolution after durability.
   */
  archiveSession(sessionId: SessionId): Promise<void> {
    return this.enqueueOperation(async () => {
      // The chain slot serializes against every other registry write, so this
      // check-then-write pair cannot interleave with another archive.
      if (this.requireState().archivedSessionIds.includes(sessionId)) return
      if (!(await this.sessionKnown(sessionId))) {
        throw new WorkspaceUnknownSessionError(sessionId)
      }
      const state = this.requireState()
      await this.setState({ ...state, archivedSessionIds: [...state.archivedSessionIds, sessionId] })
    })
  }

  /**
   * Whether a session is live, header-indexed, or present in a fresh
   * persistence listing. Only a definite miss returns false — a failing
   * `sessionPersistence.list()` propagates so storage faults never
   * masquerade as an unknown session.
   */
  private async sessionKnown(id: SessionId): Promise<boolean> {
    if (this.ctx.get('sessions')?.get(id) !== undefined) return true
    if (this.headers.has(id)) return true
    await this.indexHeaders(await this.ctx.sessionPersistence.list())
    return this.headers.has(id)
  }

View on GitHub (pinned to b150a551b8)

Solutions

  1. Verify the session id exists in live sessions or persistence before archiving; refresh state and retry.

When it happens

Trigger: Thrown at packages/workspace/workspace/src/index.ts:250 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/4f6f6bb0b271d05b. Report an issue: GitHub.