deepseek-ai/deepseek-harness · error · SessionForkError
OPEN_TURN
OPEN_TURN
Error message
fork boundary ${boundary} in session "${session.id}" ends inside open turn ${lastTurnBoundary.data.turn} What it means
Error "fork boundary ${boundary} in session "${session.id}" ends inside open turn ${lastTurnBoundary.data.turn}" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/core/session/src/index.ts:1131
if (boundary >= events.length) {
const lastSeq = events.at(-1)?.seq
throw new SessionForkError(
`fork boundary ${boundary} does not exist in session "${session.id}" (last seq: ${lastSeq ?? 'none'})`,
'INVALID_BOUNDARY',
)
}
const boundaryEvent = events[boundary]
if (boundaryEvent === undefined || boundaryEvent.seq !== boundary) {
throw new SessionForkError(
`fork boundary ${boundary} does not match a contiguous event seq in session "${session.id}"`,
'INVALID_BOUNDARY',
)
}
const lastTurnBoundary = events.slice(0, boundary + 1)
.findLast(event => event.type === 'turn/start' || event.type === 'turn/end')
if (lastTurnBoundary?.type === 'turn/start') {
throw new SessionForkError(
`fork boundary ${boundary} in session "${session.id}" ends inside open turn ${lastTurnBoundary.data.turn}`,
'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')View on GitHub (pinned to b150a551b8)
When it happens
Trigger: Thrown at packages/core/session/src/index.ts:1131 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/3d1aacb7ff6aacba.
Report an issue: GitHub.