deepseek-ai/deepseek-harness · error · SessionForkError

SESSION_NOT_LIVE

SESSION_NOT_LIVE

Error message

session "${source.id}" is not the live store instance

What it means

Identity check in _resolveForkSource: a session object was passed as the fork source, and although a live session with the same id exists, it is not the same object. The passed Session is stale, projected, or from another store, so forking from it could diverge from the store's canonical event log.

Solutions

  1. Pass the store's live instance (re-fetch with store.get(source.id))
  2. Or pass the session id as a string and let the store resolve it
  3. Discard Session objects captured before a store reload/disposal
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/core/session/src/index.ts:1151 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/742c249b058d0a05. Report an issue: GitHub.

Appendix: source

Thrown at packages/core/session/src/index.ts:1151

        'OPEN_TURN',
      )
    }

    return events.slice(0, boundary + 1)
  }

  private _resolveForkSource(source: SessionForkSource): Session {
    if (typeof source === 'string') {
      const session = this.get(source)
      if (session === undefined) throw new SessionForkError(`session "${source}" not found`, 'SESSION_NOT_FOUND')
      return session
    }

    const live = this.get(source.id)
    if (live === undefined) {
      throw new SessionForkError(`session "${source.id}" not found`, 'SESSION_NOT_FOUND')
    }
    if (live !== source) throw new SessionForkError(`session "${source.id}" is not the live store instance`, 'SESSION_NOT_LIVE')
    return source
  }

}

export default SessionStore

View on GitHub (pinned to b150a551b8)