deepseek-ai/deepseek-harness · error · Error
cannot validate session
Error message
cannot validate session '${id}': session persistence holds no such session What it means
Header-resolution failure in the workspace service: a session id could not be found in live sessions, the header cache, or session persistence, so a validation/attach step cannot read its cwd. The id is stale or was deleted concurrently.
Solutions
- Verify the session id; the session must exist in persistence before it can be validated or attached.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/workspace/workspace/src/index.ts:628 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/e70d9216f5c2fb20.
Report an issue: GitHub.
Appendix: source
Thrown at packages/workspace/workspace/src/index.ts:628
)
}
}
}
private async readSessionHeader(id: SessionId): Promise<SessionHeader> {
const live = this.ctx.get('sessions')?.get(id)
if (live !== undefined) {
this.headers.set(id, live.header)
return live.header
}
const cached = this.headers.get(id)
if (cached !== undefined) return cached
const headers = await this.ctx.sessionPersistence.list()
await this.indexHeaders(headers)
const header = this.headers.get(id)
if (header === undefined) {
throw new Error(`cannot validate session '${id}': session persistence holds no such session`)
}
return header
}
private requireTable(): KvTable<WorkspaceId, WorkspaceRecord> {
if (this.table === undefined) throw new Error('workspace registry is not started yet')
return this.table
}
private requireState(): WorkspaceDomainState {
if (this.state === undefined) throw new Error('workspace registry is not started yet')
return this.state
}
private async setState(state: WorkspaceDomainState): Promise<void> {
await (this.global as DomainGlobal<WorkspaceDomainState>).set(state)
this.state = state
}View on GitHub (pinned to b150a551b8)